Skip to content

Commit

Permalink
i18n: git-clean clean.requireForce messages
Browse files Browse the repository at this point in the history
Split up the "clean.requireForce set/defaults to true..." die()
message to make it easier to translate.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Mar 10, 2011
1 parent 2da57ad commit a66f9b2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions builtin/clean.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a66f9b2

Please sign in to comment.