From 6c95f19dbc7bed61940f197c4afc2213f0e77293 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 19 Sep 2010 15:48:06 +0000 Subject: [PATCH] gettextize: git-add "pathspec [...] did not match" message MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- 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 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 -- 2.30.2