Skip to content

Commit fc792ca

Browse files
qsuscsgitster
authored andcommitted
checkout: call a single commit "it" intead of "them"
When detached and checking out a branch again, git checkout warns about commit(s) that might get lost. It says "If you want to keep them ..." even for only one commit. Use Q_() to allow differentiating singular vs plural. Signed-off-by: Thomas Schneider <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2dfb2e0 commit fc792ca

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

builtin/checkout.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,10 +743,17 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)
743743

744744
if (advice_detached_head)
745745
fprintf(stderr,
746-
_(
746+
Q_(
747+
/* The singular version */
748+
"If you want to keep it by creating a new branch, "
749+
"this may be a good time\nto do so with:\n\n"
750+
" git branch <new-branch-name> %s\n\n",
751+
/* The plural version */
747752
"If you want to keep them by creating a new branch, "
748753
"this may be a good time\nto do so with:\n\n"
749-
" git branch <new-branch-name> %s\n\n"),
754+
" git branch <new-branch-name> %s\n\n",
755+
/* Give ngettext() the count */
756+
lost),
750757
find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
751758
}
752759

0 commit comments

Comments
 (0)