diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-01 17:32:04 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-04 01:54:41 -0800 |
commit | 562ca192f94496611583688beb3725603ce51f89 (patch) | |
tree | 3f75997bec9232fe760ea1d8a695b9055286d6fc /git-clean.sh | |
parent | RelNotes-1.5.3.5: fix typo (diff) | |
download | tgif-562ca192f94496611583688beb3725603ce51f89.tar.xz |
clean: require -f to do damage by default
This makes the clean.requireForce configuration default to true.
Too many people are burned by typing "git clean" by mistake when
they meant to say "make clean".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-clean.sh')
-rwxr-xr-x | git-clean.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/git-clean.sh b/git-clean.sh index 4491738186..f4965b8391 100755 --- a/git-clean.sh +++ b/git-clean.sh @@ -20,12 +20,16 @@ require_work_tree ignored= ignoredonly= cleandir= -disabled="`git config --bool clean.requireForce`" rmf="rm -f --" rmrf="rm -rf --" rm_refuse="echo Not removing" echo1="echo" +# requireForce used to default to false but now it defaults to true. +# IOW, lack of explicit "clean.requireForce = false" is taken as +# "clean.requireForce = true". +disabled=$(git config --bool clean.requireForce || echo true) + while test $# != 0 do case "$1" in |