From: Thomas Schneider Date: Wed, 01 Apr 2015 17:38:00 GMT Subject: [PATCH] checkout: Say “it” instead of “them” for one commit Message-ID: <1427909880-9846-1-git-send-email-thosch97@gmail.com> When detached and checking out a branch again, git checkout warns about commit(s) that might get lost. It used to say “If you want to keep them […]” even for only one commit. Signed-off-by: Thomas Schneider --- builtin/checkout.c | 11 +++++++++-- 1 file 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 %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 %s\n\n"), + " git branch %s\n\n", + /* Give ngettext() the count */ + lost), find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV)); } -- 2.1.0