Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-02 03:32:04 +0300
committerJunio C Hamano <gitster@pobox.com>2007-11-04 12:54:41 +0300
commit562ca192f94496611583688beb3725603ce51f89 (patch)
tree3f75997bec9232fe760ea1d8a695b9055286d6fc /t/t7300-clean.sh
parentee787400de25ed419f40e70698ba35db475b2d61 (diff)
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 &&