@matheusbsbs / matheus-bagliano / commits / 48168851cf
Fork 0

i18n: git-add "did not match any files" message

Make the "did not match any files" message translatable, and skip the test that checks for it when the C_LOCALE_OUTPUT prereq is not present. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Feb 22, 2011 at 23:41 UTC 48168851cffcd14e01d3a10473a02ca4b4479402
2 files changed +7 -3
builtin/add.c
+1 -1
@@ -451,7 +451,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
451 if (excluded(&dir, pathspec[i], &dtype))
452 dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));
453 } else
454 - die("pathspec '%s' did not match any files",
454 + die(_("pathspec '%s' did not match any files"),
455 pathspec[i]);
456 }
457 }
t/t3700-add.sh
+6 -2
@@ -268,8 +268,12 @@ test_expect_success 'git add --dry-run of existing changed file' "
268
269 test_expect_success 'git add --dry-run of non-existing file' "
270 echo ignored-file >>.gitignore &&
271 - test_must_fail git add --dry-run track-this ignored-file >actual 2>&1 &&
272 - echo \"fatal: pathspec 'ignored-file' did not match any files\" | test_cmp - actual
271 + test_must_fail git add --dry-run track-this ignored-file >actual 2>&1
272 +"
273 +
274 +test_expect_success C_LOCALE_OUTPUT 'git add --dry-run of an existing file output' "
275 + echo \"fatal: pathspec 'ignored-file' did not match any files\" >expect &&
276 + test_cmp expect actual
277 "
278
279 cat >expect.err <<\EOF