summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a576090)
raw | patch | inline | side by side (parent: a576090)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Tue, 22 Feb 2011 23:41:38 +0000 (23:41 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 10 Mar 2011 07:52:53 +0000 (23:52 -0800) |
Gettextize the "(no branch)" message that's shown by "git branch" when
you're in a detached HEAD.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
you're in a detached HEAD.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c | patch | blob | history | |
t/t3203-branch-output.sh | patch | blob | history |
diff --git a/builtin/branch.c b/builtin/branch.c
index 4c1a2562476c1234472e709c102dce925a271de0..244589e73657bf1f2eaa1450c36f59869c0a44d6 100644 (file)
--- a/builtin/branch.c
+++ b/builtin/branch.c
if (head_commit && is_descendant_of(head_commit, ref_list->with_commit)) {
struct ref_item item;
- item.name = xstrdup("(no branch)");
+ item.name = xstrdup(_("(no branch)"));
item.len = strlen(item.name);
item.kind = REF_LOCAL_BRANCH;
item.dest = NULL;
index 6028748c6cecaedb087c35182de172ca0e93fe08..4ef7d09115678ff97717a5f6a3027a87490dac79 100755 (executable)
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
branch-two
master
EOF
-test_expect_success 'git branch shows detached HEAD properly' '
+test_expect_success C_LOCALE_OUTPUT 'git branch shows detached HEAD properly' '
git checkout HEAD^0 &&
git branch >actual &&
test_cmp expect actual