[PATCH 11/72] gettextize: git-add "pathspec [...] did not match" message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]