aboutsummaryrefslogtreecommitdiff
path: root/builtin-clean.c
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2010-02-04 17:01:16 +0100
committerJunio C Hamano <gitster@pobox.com>2010-02-04 15:12:13 -0800
commit89c38500192e00988966246420902dc946e4f4ef (patch)
treeb7747bd7290a53413f679a7b59f5323767fd42ac /builtin-clean.c
parent76ea93ccb5df138eb57b2e8f2aee61dd1ca666ea (diff)
downloadgit-89c38500192e00988966246420902dc946e4f4ef.tar.gz
git-89c38500192e00988966246420902dc946e4f4ef.tar.xz
git-clean: fix the description of the default behavior
Currently, when called without -n and -f, git clean issues fatal: clean.requireForce not set and -n or -f not given; refusing to clean which leaves the user wondering why force is required when requireForce is not set. Looking up in git-clean(1) does not help because its description is wrong. Change it so that git clean issues fatal: clean.requireForce defaults to true and -n or -f not given; refusing to clean in this situation (and "...set to true..." when it is set) which makes it clearer that an unset config means true here, and adjust the documentation. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-clean.c')
-rw-r--r--builtin-clean.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-clean.c b/builtin-clean.c
index 3a70fa81b..fac64e6cd 100644
--- a/builtin-clean.c
+++ b/builtin-clean.c
@@ -67,8 +67,8 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
die("-x and -X cannot be used together");
if (!show_only && !force)
- die("clean.requireForce%s set and -n or -f not given; "
- "refusing to clean", config_set ? "" : " not");
+ die("clean.requireForce %s to true and neither -n nor -f given; "
+ "refusing to clean", config_set ? "set" : "defaults");
if (force > 1)
rm_flags = 0;