2013/4/26 Matthieu Moy <matthieu....@grenoble-inp.fr>
> Jiang Xin <worldhello....@gmail.com> writes:
> >  * run `git clean` in interactive sessions,
> >  * not a dry run,
> >  * and not quiet.
> Err, does this mean I'll have:
> $ git clean
> fatal: clean.requireForce defaults to true and neither -n nor -f given; 
> refusing to clean
> $ git clean --force

( you omit something, because nothing to clean won't trigger this
confirm dialog)

> Are you sure [y/n]?
> An optional confirmation dialog seems interesting, but activating it by
> default even with --force seems really weird.

I don't know how many programmers had been bitten by runing `git clean -fdx`,
but I bet there were some. I think safety should be put to the 1st place.
It is because "clean.requireForce" defaults to true, all people trend to run
'git clean' with the '--force/-f' option.

Maybe we can do like this:

1. Set the default value of 'clean.requireForce' to false.
2. Show a error message and do nothing, if there is not 'clean.requireForce'
    setting, but the user called with a '--force' flag.
    ( like a transition for the change of push.default in git 2.0)

any opinions?

> --
> Matthieu Moy
> http://www-verimag.imag.fr/~moy/


邮件: worldhello....@gmail.com
网址: http://www.ossxp.com/
博客: http://www.worldhello.net/
微博: http://weibo.com/gotgit/
电话: 18601196889
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to