* [PATCH] checkout: Say “it” instead of “them” for one commit
@ 2015-04-01 17:38 Thomas Schneider
2015-04-01 19:43 ` Jonathan Nieder
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Schneider @ 2015-04-01 17:38 UTC (permalink / raw)
To: git; +Cc: Thomas Schneider
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 <thosch97@gmail.com>
---
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 <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));
}
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] checkout: Say “it” instead of “them” for one commit
2015-04-01 17:38 [PATCH] checkout: Say “it” instead of “them” for one commit Thomas Schneider
@ 2015-04-01 19:43 ` Jonathan Nieder
2015-04-02 23:14 ` Thomas Schneider
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Nieder @ 2015-04-01 19:43 UTC (permalink / raw)
To: Thomas Schneider; +Cc: git, Junio C Hamano
Hi,
Thomas Schneider wrote:
> 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 <thosch97@gmail.com>
Makes sense.
[...]
> --- 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));
The comments for /* singular */, /* plural */, and /* count */ seem
redundant and distracting to me, but since we have the same comments a
few lines before, keeping it consistent is the right thing to do.
For what it's worth,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] checkout: Say “it” instead of “them” for one commit
2015-04-01 19:43 ` Jonathan Nieder
@ 2015-04-02 23:14 ` Thomas Schneider
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Schneider @ 2015-04-02 23:14 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Jonathan Nieder
Junio –
I see you changed my commit message a bit, but some mistakes seem to
have slipped in:
> checkout: call a single commit “it” instead of “th
“them” was cut off, including the trailing quotation mark.
[…]
> them ..."” even for only one commit.
Two quotation marks?
I always use the “right” quotation marks instead of " or ' and “…”
instead of “...”, should I have used the latter ones?
Thanks,
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-02 23:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-01 17:38 [PATCH] checkout: Say “it” instead of “them” for one commit Thomas Schneider
2015-04-01 19:43 ` Jonathan Nieder
2015-04-02 23:14 ` Thomas Schneider
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).