[PATCH 11/72] gettextize: git-add "pathspec [...] did not match" message
From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:50:36
Subsystem:
the rest · Maintainer:
Linus Torvalds
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 <redacted> --- 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