X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fclean.c;h=75697f711116e42df1e21e608c21829f49549b08;hb=02071b27f1587c65ddc4779017a3ddceb777de9c;hp=2d0054be5859fbfbcdf59ad66e394430d8fe1d97;hpb=2da57add287c9a5b26e348c35947d6de369e77da;p=git.git diff --git a/builtin/clean.c b/builtin/clean.c index 2d0054be5..75697f711 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -77,9 +77,14 @@ int cmd_clean(int argc, const char **argv, const char *prefix) if (ignored && ignored_only) die(_("-x and -X cannot be used together")); - if (!show_only && !force) - die("clean.requireForce %s to true and neither -n nor -f given; " - "refusing to clean", config_set ? "set" : "defaults"); + if (!show_only && !force) { + if (config_set) + die(_("clean.requireForce set to true and neither -n nor -f given; " + "refusing to clean")); + else + die(_("clean.requireForce defaults to true and neither -n nor -f given; " + "refusing to clean")); + } if (force > 1) rm_flags = 0;