git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Michael J Gruber" <git@drmicha.warpmail.net>,
	"Thomas Rast" <trast@student.ethz.ch>,
	"Christian Stimming" <stimming@tuhh.de>,
	"Thomas Hochstein" <thh@inter.net>,
	"Andreas Schwab" <schwab@linux-m68k.org>, "Jan Krüger" <jk@jk.gs>,
	"Jens Lehmann" <Jens.Lehmann@web.de>,
	"Jan Engelhardt" <jengelh@medozas.de>,
	"Johannes Sixt" <j.sixt@viscovery.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 072/161] gettextize: git-push "prevent you from losing" message
Date: Sat, 30 Oct 2010 08:16:10 +0000	[thread overview]
Message-ID: <1288426571-7072-2-git-send-email-avarab@gmail.com> (raw)
In-Reply-To: <1288426571-7072-1-git-send-email-avarab@gmail.com>

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

I've modified this to skip an additional test in t/t5541-http-push.sh
that started failing after recent modifications to that file in
upstream.

 builtin/push.c       |    4 ++--
 t/lib-httpd.sh       |    2 +-
 t/t5541-http-push.sh |    7 +++++--
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/builtin/push.c b/builtin/push.c
index 513bc57..8c8d8c7 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -129,9 +129,9 @@ static int push_with_options(struct transport *transport, int flags)
 		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 e733f65..817b865 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -154,7 +154,7 @@ test_http_push_nonff() {
 		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 b0c2a2c..b341d8b 100755
--- 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
 '
-- 
1.7.3.1.50.g1e633

      reply	other threads:[~2010-10-30  8:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-30  8:16 [PATCH 000/161] [PULL] Updated + rebased ab/i18n Ævar Arnfjörð Bjarmason
2010-10-30  8:16 ` Ævar Arnfjörð Bjarmason [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288426571-7072-2-git-send-email-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=jengelh@medozas.de \
    --cc=jk@jk.gs \
    --cc=schwab@linux-m68k.org \
    --cc=stimming@tuhh.de \
    --cc=thh@inter.net \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).