Re: [PATCH] clean: confirm before cleaning files and directories
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Apr 26, 2013, 16:19 UTC
- Message-ID
- <vpqzjwl9se7.fsf@grenoble-inp.fr>
- In-Reply-To
- <7vbo91z30e.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> "git clean" without -n/f errors out, hinting the availablilty of -n > while mentioning -f; that is the safety, isn't it? Once the user > decides to give -f, the user _wants_ to remove cruft, and it is a > hinderance to require any further confirmation.
This is only half true: because "git clean" does nothing without -f, people's fingers get trained to type "git clean -f" without really thinking about it. Just like people alias rm='rm -i' and then type "rm -fr *" mechanically.
The nice thing with the confirmation dialog is that it shows the list before asking (and unlike 'rm -i', it asks only once).
But as I said in another thread, I fully agree that adding the confirmation by default even with -f is nonsense.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/