summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorThomas Schneider <thosch97@gmail.com>2015-04-01 17:38:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-04-02 23:44:59 (GMT)
commitfc792ca86049a85f9cf916d6bcdbbc1799ba91ec (patch)
tree3e8bceb1af8bdd1af42aea7c022c4d44d880c521 /builtin
parent2dfb2e07cb0cb979f630643b57dca579a0359a9d (diff)
downloadgit-fc792ca86049a85f9cf916d6bcdbbc1799ba91ec.zip
git-fc792ca86049a85f9cf916d6bcdbbc1799ba91ec.tar.gz
git-fc792ca86049a85f9cf916d6bcdbbc1799ba91ec.tar.bz2
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 <thosch97@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/checkout.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 3e141fc..4aad49a 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -743,10 +743,17 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)
if (advice_detached_head)
fprintf(stderr,
- _(
+ Q_(
+ /* The singular version */
+ "If you want to keep it by creating a new branch, "
+ "this may be a good time\nto do so with:\n\n"
+ " git branch <new-branch-name> %s\n\n",
+ /* The plural version */
"If you want to keep them by creating a new branch, "
"this may be a good time\nto do so with:\n\n"
- " git branch <new-branch-name> %s\n\n"),
+ " git branch <new-branch-name> %s\n\n",
+ /* Give ngettext() the count */
+ lost),
find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
}