提交 48168851 编写于 作者: Æ Ævar Arnfjörð Bjarmason 提交者: Junio C Hamano

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: NÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 439fb829
......@@ -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]);
}
}
......
......@@ -268,8 +268,12 @@ 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
test_must_fail git add --dry-run track-this ignored-file >actual 2>&1
"
test_expect_success C_LOCALE_OUTPUT 'git add --dry-run of an existing file output' "
echo \"fatal: pathspec 'ignored-file' did not match any files\" >expect &&
test_cmp expect actual
"
cat >expect.err <<\EOF
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册