summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5d22b3f)
raw | patch | inline | side by side (parent: 5d22b3f)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sun, 19 Sep 2010 19:32:01 +0000 (19:32 +0000) | ||
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 30 Oct 2010 07:57:41 +0000 (07:57 +0000) |
Gettextize the "To prevent you from losing history" message. A test in
lib-httpd.sh and another in t5541-http-push.sh explicitly checked for
this message. Change them to skip under GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
lib-httpd.sh and another in t5541-http-push.sh explicitly checked for
this message. Change them to skip under GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
builtin/push.c | patch | blob | history | |
t/lib-httpd.sh | patch | blob | history | |
t/t5541-http-push.sh | patch | blob | history |
diff --git a/builtin/push.c b/builtin/push.c
index 513bc572443657abdefc8797249b7e4de7f62b41..8c8d8c717be6be5b4c701d6af53307ac684c54a5 100644 (file)
--- a/builtin/push.c
+++ b/builtin/push.c
return 0;
if (nonfastforward && advice_push_nonfastforward) {
- fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n"
+ fprintf(stderr, _("To prevent you from losing history, non-fast-forward updates were rejected\n"
"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n"
- "'Note about fast-forwards' section of 'git push --help' for details.\n");
+ "'Note about fast-forwards' section of 'git push --help' for details.\n"));
}
return 1;
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index e733f6516fdf98e48d5c7cd36ecc89d36166eea1..817b865fb0f997b776593984495b9367fe7a2882 100644 (file)
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
grep "^ ! \[rejected\][ ]*$BRANCH -> $BRANCH (non-fast-forward)$" output
'
- test_expect_success 'non-fast-forward push shows help message' '
+ test_expect_success NO_GETTEXT_POISON 'non-fast-forward push shows help message' '
grep "To prevent you from losing history, non-fast-forward updates were rejected" \
output
'
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index b0c2a2c3aea811ec023423bdb486de5412fa79c5..b341d8b3de9d6c23d072c33e5fd2415f030eb8e7 100755 (executable)
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -128,11 +128,14 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he
# push master too; this ensures there is at least one '"'push'"' command to
# the remote helper and triggers interaction with the helper.
- test_must_fail git push -v origin +master master:retsam >output 2>&1 &&
+ test_must_fail git push -v origin +master master:retsam >output 2>&1'
+test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper: remote output' '
grep "^ + [a-f0-9]*\.\.\.[a-f0-9]* *master -> master (forced update)$" output &&
- grep "^ ! \[rejected\] *master -> retsam (non-fast-forward)$" output &&
+ grep "^ ! \[rejected\] *master -> retsam (non-fast-forward)$" output
+'
+test_expect_success NO_GETTEXT_POISON 'push fails for non-fast-forward refs unmatched by remote helper: our output' '
grep "To prevent you from losing history, non-fast-forward updates were rejected" \
output
'