From: Ævar Arnfjörð Bjarmason Date: Sun, 19 Sep 2010 15:48:06 +0000 (+0000) Subject: gettextize: git-add "pathspec [...] did not match" message X-Git-Tag: ko-pu~10^2~130 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6c95f19dbc7bed61940f197c4afc2213f0e77293;p=git.git gettextize: git-add "pathspec [...] did not match" message Gettextize the "pathspec '%s' did not match any files" message. A test in t3700-add.sh explicitly checked for this message. Change it to skip under GETTEXT_POISON=YesPlease. Signed-off-by: Ævar Arnfjörð Bjarmason --- diff --git a/builtin/add.c b/builtin/add.c index a88f50f33..e2bc26024 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -449,7 +449,7 @@ int cmd_add(int argc, const char **argv, const char *prefix) if (excluded(&dir, pathspec[i], DT_UNKNOWN)) dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i])); } else - die("pathspec '%s' did not match any files", + die(_("pathspec '%s' did not match any files"), pathspec[i]); } } diff --git a/t/t3700-add.sh b/t/t3700-add.sh index d4fc56312..950719158 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -269,7 +269,11 @@ test_expect_success 'git add --dry-run of existing changed file' " test_expect_success 'git add --dry-run of non-existing file' " echo ignored-file >>.gitignore && test_must_fail git add --dry-run track-this ignored-file >actual 2>&1 && - echo \"fatal: pathspec 'ignored-file' did not match any files\" | test_cmp - actual + echo \"fatal: pathspec 'ignored-file' did not match any files\" >expect +" + +test_expect_success NO_GETTEXT_POISON 'git add --dry-run of an existing file output' " + test_cmp expect actual " cat >expect.err <<\EOF