Re: [PATCH] checkout: Say “it” instead of “them” for one commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]