Subject: Re: git clean deletes negated pathspec if directory causing data loss

From: Junio C Hamano <[email-masked]>
Date: Thu, 30 Oct 2025 10:04:51 -0700

Johannes Schindelin <[email-masked]> writes:

> In case the Git maintainer (whose call it is, ultimately, on which side to
> land regarding above-mentioned options) sides with your interpretation,
> here is a patch to add a regression test demonstrating your use case:

Thanks for an opinion.

As "git clean -X" is not really "my thing", not in the sense that I
did not write it (I didn't, except for code clean-ups) but in the
sense that I see no good use case for the option and I rarely use it
myself, as long as its behaviour can be "explained", like you just
did, I do not have preference myself, and no strong motivation to
advocate changing it, risking potential disruption on existing
users.