@matheusbsbs / matheus-bagliano / commits / 9c227655b0
Fork 0

i18n: git-commit "middle of a merge" message

Gettextize the "You are in the middle of a merge -- cannot amend." message. Several tests in t7110-reset-merge.sh explicitly checked for this message. Change them to skip under GETTEXT_POISON=YesPlease. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Feb 22, 2011 at 23:41 UTC 9c227655b02c8f84e319a57bb8dd7cff63e3fbf8
2 files changed +5 -5
builtin/commit.c
+2 -2
@@ -928,9 +928,9 @@ static int parse_and_validate_options(int argc, const char *argv[],
928 if (amend && initial_commit)
929 die(_("You have nothing to amend."));
930 if (amend && in_merge)
931 - die("You are in the middle of a merge -- cannot amend.");
931 + die(_("You are in the middle of a merge -- cannot amend."));
932 if (fixup_message && squash_message)
933 - die("Options --squash and --fixup cannot be used together");
933 + die(_("Options --squash and --fixup cannot be used together"));
934 if (use_message)
935 f++;
936 if (edit_message)
t/t7110-reset-merge.sh
+3 -3
@@ -233,7 +233,7 @@ test_expect_success '"reset --merge HEAD^" is ok with pending merge' '
233 # working index HEAD target working index HEAD
234 # ----------------------------------------------------
235 # file1: X U B C --keep (disallowed)
236 -test_expect_success '"reset --keep HEAD^" fails with pending merge' '
236 +test_expect_success C_LOCALE_OUTPUT '"reset --keep HEAD^" fails with pending merge' '
237 git reset --hard third &&
238 test_must_fail git merge branch1 &&
239 test_must_fail git reset --keep HEAD^ 2>err.log &&
@@ -259,7 +259,7 @@ test_expect_success '"reset --merge HEAD" is ok with pending merge' '
259 # working index HEAD target working index HEAD
260 # ----------------------------------------------------
261 # file1: X U B B --keep (disallowed)
262 -test_expect_success '"reset --keep HEAD" fails with pending merge' '
262 +test_expect_success C_LOCALE_OUTPUT '"reset --keep HEAD" fails with pending merge' '
263 git reset --hard third &&
264 test_must_fail git merge branch1 &&
265 test_must_fail git reset --keep HEAD 2>err.log &&
@@ -280,7 +280,7 @@ test_expect_success '--merge is ok with added/deleted merge' '
280 git diff --exit-code --cached
281 '
282
283 -test_expect_success '--keep fails with added/deleted merge' '
283 +test_expect_success C_LOCALE_OUTPUT '--keep fails with added/deleted merge' '
284 git reset --hard third &&
285 rm -f file2 &&
286 test_must_fail git merge branch3 &&