Re: Add a way to disable «git clean» per repo
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 3, 2023, 17:36 UTC
- Message-ID
- <xmqq355g6f6u.fsf@gitster.g>
- In-Reply-To
- <ZCiZCM+AAUnjp4Ml@thunder.hadrons.org>
Guillem Jover <guillem@hadrons.org> writes:
> Accidentally running «git clean -xdf» or «git clean -Xdf» might be > catastrophic there.
So would accidentally running "rm -fr" there be catastrophic, too. I doubt it would make much sense to file a feature request to Debian or GNU/FSF to disable "rm -r" in certain directories. I am not sure why "git clean" should be any different.
Commands like "git clean" require "-f" before they become overly destructuve for a reason. clean.requireForce defaults to true for the same reason.