summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fe8165c)
raw | patch | inline | side by side (parent: fe8165c)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Tue, 22 Feb 2011 23:41:47 +0000 (23:41 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 10 Mar 2011 07:52:54 +0000 (23:52 -0800) |
Gettextize the "(root-commit)" and "detached HEAD" fragments that
appear when you commit either the root commit, or a commit in a
detached head translatable.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
appear when you commit either the root commit, or a commit in a
detached head translatable.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c | patch | blob | history | |
t/t7502-commit.sh | patch | blob | history |
diff --git a/builtin/commit.c b/builtin/commit.c
index c1da66c2d7a9ce3c76be0f4b52f07fd4339c0d95..4986cd442c42ecb7b6240c9703884a98f7974bae 100644 (file)
--- a/builtin/commit.c
+++ b/builtin/commit.c
!prefixcmp(head, "refs/heads/") ?
head + 11 :
!strcmp(head, "HEAD") ?
- "detached HEAD" :
+ _("detached HEAD") :
head,
- initial_commit ? " (root-commit)" : "");
+ initial_commit ? _(" (root-commit)") : "");
if (!log_tree_commit(&rev, commit)) {
rev.always_show_header = 1;
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index 034b9c35aad37f0f12f152c75980474038aa8b27..dad1b2b80d0754001adde2e09b2a331d0e4207bf 100755 (executable)
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
SUMMARY_POSTFIX="$(git log -1 --pretty='format:%h')"
echo "[$SUMMARY_PREFIX $SUMMARY_POSTFIX] $2" >exp &&
- test_cmp exp act
+ if test_have_prereq C_LOCALE_OUTPUT
+ then
+ test_cmp exp act
+ fi
}
test_expect_success 'output summary format' '
check_summary_oneline "root-commit" "initial" &&
echo change >>file1 &&
- git add file1 &&
+ git add file1
+'
+
+test_expect_success 'output summary format: root-commit' '
check_summary_oneline "" "a change"
'