aboutsummaryrefslogtreecommitdiff
path: root/t/t7300-clean.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-01 17:32:04 -0700
committerJunio C Hamano <gitster@pobox.com>2007-11-04 01:54:41 -0800
commit562ca192f94496611583688beb3725603ce51f89 (patch)
tree3f75997bec9232fe760ea1d8a695b9055286d6fc /t/t7300-clean.sh
parentee787400de25ed419f40e70698ba35db475b2d61 (diff)
downloadgit-562ca192f94496611583688beb3725603ce51f89.tar.gz
git-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 't/t7300-clean.sh')
-rwxr-xr-xt/t7300-clean.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index eb0847afe..8697213e6 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -7,6 +7,8 @@ test_description='git-clean basic tests'
. ./test-lib.sh
+git config clean.requireForce no
+
test_expect_success 'setup' '
mkdir -p src &&
@@ -139,6 +141,13 @@ test_expect_success 'git-clean -d -X' '
'
+test_expect_success 'clean.requireForce defaults to true' '
+
+ git config --unset clean.requireForce &&
+ ! git-clean
+
+'
+
test_expect_success 'clean.requireForce' '
git config clean.requireForce true &&