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>
This commit is contained in:
Ævar Arnfjörð Bjarmason
2011-02-22 23:41:38 +00:00
committed by Junio C Hamano
parent a5760906e7
commit 409fa556ce
2 changed files with 2 additions and 2 deletions

View File

@ -476,7 +476,7 @@ static void show_detached(struct ref_list *ref_list)
if (head_commit && is_descendant_of(head_commit, ref_list->with_commit)) { if (head_commit && is_descendant_of(head_commit, ref_list->with_commit)) {
struct ref_item item; struct ref_item item;
item.name = xstrdup("(no branch)"); item.name = xstrdup(_("(no branch)"));
item.len = strlen(item.name); item.len = strlen(item.name);
item.kind = REF_LOCAL_BRANCH; item.kind = REF_LOCAL_BRANCH;
item.dest = NULL; item.dest = NULL;

View File

@ -72,7 +72,7 @@ cat >expect <<'EOF'
branch-two branch-two
master master
EOF 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 checkout HEAD^0 &&
git branch >actual && git branch >actual &&
test_cmp expect actual test_cmp expect actual