Re: [PATCH] branch.c: simplify chain of if statements

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

 



On Mon, Mar 17, 2014 at 12:46 PM, Dragos Foianu <dragos.foianu@xxxxxxxxx> wrote:
> The reason I did not go with this is because I would still need the four ifs
> in order to keep the bug check part of the code. I might be able to find a
> work-around for it on the second attempt.
>
> I have seen N_() used in other code but I wasn't sure what its purpose was.

Aside from other comments here, more generally if you see code that
looks odd it helps to see why it was introduced initially.

In this case if you'd ran e.g.:

    git log --reverse -p -G'Branch %s set up to track remote branch %s
from %s by rebasing' -- branch.c

or otherwise searched for the first occurrence of that odd-looking
code you'd have gotten:

    commit d53a3503
    Author: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
    Date:   Thu Jun 7 19:05:10 2012 +0700

    Remove i18n legos in notifying new branch tracking setup

    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
    Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>

And searching for that commit has plenty of context for why that was
done: https://www.google.com/search?q=%22Remove%20i18n%20legos%20in%20notifying%20new%20branch%20tracking%20setup%22
--
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]