Re: [PATCH] remote.c: specify correct plural form in "commit diverge" message

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

 



On Mon, May 2, 2016 at 5:12 PM, Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> wrote:
> We need to count both "ours" and "theirs" commits when selecting plural
> form for this message. Note that even though in this block, both ours
> and theirs must be positive (i.e. can't be in singular form), we still
> keep Q_(singular, plural) because languages other than English may have
> more than one plural form.
>
> Reported-by: Alfonsogonzalez, Ernesto (GE Digital) <ernesto.alfonsogonzalez@xxxxxx>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> ---
>  remote.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/remote.c b/remote.c
> index 28fd676..212426e 100644
> --- a/remote.c
> +++ b/remote.c
> @@ -2108,7 +2108,7 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb)
>                            "Your branch and '%s' have diverged,\n"
>                                "and have %d and %d different commits each, "
>                                "respectively.\n",
> -                          theirs),
> +                          ours + theirs),

I think it needs to be max(ours, theirs)

    "Your branch and '%s' have diverged,\n"
    "and have 1 and 1 different commit each, "

so singular for that too, no?


>                         base, ours, theirs);
>                 if (advice_status_hints)
>                         strbuf_addf(sb,
> --
> 2.8.0.rc0.210.gd302cd2
>
> --
> 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
--
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]