path: root/advice.c
diff options
authorVasco Almeida <>2016-06-17 20:20:51 (GMT)
committerJunio C Hamano <>2016-06-17 22:45:47 (GMT)
commite9f3cec494330a86a412adaee95360ddea6fcf54 (patch)
tree983c3d0e3aa4f1244b650bb52954baf84a6e1c01 /advice.c
parent070b7e441649b9c2543fda7bfbef0ad58761f869 (diff)
i18n: advice: mark string about detached head for translation
Mark string with advice seen by the user when in detached head. Update test to pass under GETTEXT_POISON build. Pretend success if the number of lines of "git checkout renamer^" output is not greater than 1 and test are running under GETTEXT_POISON. Signed-off-by: Vasco Almeida <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'advice.c')
1 files changed, 3 insertions, 3 deletions
diff --git a/advice.c b/advice.c
index 4dc5cf1..cb445a7 100644
--- a/advice.c
+++ b/advice.c
@@ -106,14 +106,14 @@ void NORETURN die_conclude_merge(void)
void detach_advice(const char *new_name)
- const char fmt[] =
- "Note: checking out '%s'.\n\n"
+ const char *fmt =
+ _("Note: checking out '%s'.\n\n"
"You are in 'detached HEAD' state. You can look around, make experimental\n"
"changes and commit them, and you can discard any commits you make in this\n"
"state without impacting any branches by performing another checkout.\n\n"
"If you want to create a new branch to retain commits you create, you may\n"
"do so (now or later) by using -b with the checkout command again. Example:\n\n"
- " git checkout -b <new-branch-name>\n\n";
+ " git checkout -b <new-branch-name>\n\n");
fprintf(stderr, fmt, new_name);