Code

gettextize: git-add "pathspec [...] did not match" message
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sun, 19 Sep 2010 15:48:06 +0000 (15:48 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2010 07:10:08 +0000 (07:10 +0000)
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
t/t3700-add.sh

index a88f50f337e69b8977e477681b32558121ac533f..e2bc260245f3ec53bbadc97ddc3357a8858cb0bb 100644 (file)
@@ -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]);
                        }
                }
index d4fc563124e400399fd74a9a41948d45ff752442..95071915815e2879551be52467cc1a9363f36321 100755 (executable)
@@ -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