Re: git clean deletes negated pathspec if directory causing data loss
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 30, 2025, 17:04 UTC
- Message-ID
- <xmqqms585nik.fsf@gitster.g>
- In-Reply-To
- <a77f4e6f-86a3-ea15-feb5-4d08636ffd94@gmx.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> 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.