i18n: git-branch "(no branch)" message
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>
Ævar Arnfjörð Bjarmason committed
Feb 22, 2011 at 23:41 UTC
409fa556ce5c7e680d773d4bb01ca2c3162a9e9d
2 files changed
+2
-2
builtin/branch.c
+1
-1
@@ -476,7 +476,7 @@ static void show_detached(struct ref_list *ref_list)
476
477
if (head_commit && is_descendant_of(head_commit, ref_list->with_commit)) {
478
struct ref_item item;
479
- item.name = xstrdup("(no branch)");
479
+ item.name = xstrdup(_("(no branch)"));
480
item.len = strlen(item.name);
481
item.kind = REF_LOCAL_BRANCH;
482
item.dest = NULL;
t/t3203-branch-output.sh
+1
-1
@@ -72,7 +72,7 @@ cat >expect <<'EOF'
72
branch-two
73
master
74
EOF
75
-test_expect_success 'git branch shows detached HEAD properly' '
75
+test_expect_success C_LOCALE_OUTPUT 'git branch shows detached HEAD properly' '
76
git checkout HEAD^0 &&
77
git branch >actual &&
78
test_cmp expect actual