[PATCH 11/72] gettextize: git-add "pathspec [...] did not match" message
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 19, 2011, 19:23 UTC
- Message-ID
- <1298143495-3681-12-git-send-email-avarab@gmail.com>
- In-Reply-To
- <1298143495-3681-1-git-send-email-avarab@gmail.com>
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 <avarab@gmail.com> --- builtin/add.c | 2 +- t/t3700-add.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/builtin/add.c b/builtin/add.c index fe4ac49..b3640c5 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -451,7 +451,7 @@ int cmd_add(int argc, const char **argv, const char *prefix) if (excluded(&dir, pathspec[i], &dtype)) 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 d4fc563..9507191 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
-- 1.7.2.3