summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5de88e2)
raw | patch | inline | side by side (parent: 5de88e2)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sun, 19 Sep 2010 17:43:11 +0000 (17:43 +0000) | ||
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 30 Oct 2010 07:10:18 +0000 (07:10 +0000) |
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>
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>
builtin/commit.c | patch | blob | history | |
t/t7502-commit.sh | patch | blob | history |
diff --git a/builtin/commit.c b/builtin/commit.c
index e6cbcc853ce10a3c911ec5697ddb9afe126a5724..469e4b9e36840d5b298ca27cdbb0f5c9fc4de8bc 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 88904356bd847ab92a0826569c27b28525937922..4fede6bef0a7a72a7da3fb48ca5d7f2bae7169eb 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 NO_GETTEXT_POISON
+ 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"
'