summaryrefslogtreecommitdiffstats
path: root/t/t7300-clean.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-02 01:32:04 +0100
committerJunio C Hamano <gitster@pobox.com>2007-11-04 10:54:41 +0100
commit562ca192f94496611583688beb3725603ce51f89 (patch)
tree3f75997bec9232fe760ea1d8a695b9055286d6fc /t/t7300-clean.sh
parentRelNotes-1.5.3.5: fix typo (diff)
downloadgit-562ca192f94496611583688beb3725603ce51f89.tar.xz
git-562ca192f94496611583688beb3725603ce51f89.zip
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 eb0847afe9..8697213e6b 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 &&