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

2014-03-18 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 7:46 AM, Dragos Foianu dragos.foi...@gmail.com wrote: Eric Sunshine sunshine at sunshineco.com writes: Matthieu already mentioned [2] that this sort of lego string construction is not internationalization-friendly. See section 4.3 [3] of the gettext manual for details.

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

2014-03-17 Thread Matthieu Moy
Dragos Foianu dragos.foi...@gmail.com writes: + const char *verbose_prints[4] = { + Branch %s set up to track remote branch %s from %s%s, + Branch %s set up to track local branch %s%s, + Branch %s set up to track remote ref %s%s, + Branch

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

2014-03-17 Thread Eric Sunshine
On Mon, Mar 17, 2014 at 3:23 AM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Dragos Foianu dragos.foi...@gmail.com writes: + const char *verbose_prints[4] = { + Branch %s set up to track remote branch %s from %s%s, + Branch %s set up to track local branch

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

2014-03-17 Thread Eric Sunshine
Thanks for the submission. Comments below to give you a taste of the Git review process... On Sun, Mar 16, 2014 at 5:22 PM, Dragos Foianu dragos.foi...@gmail.com wrote: This patch uses a table-driven approach in order to make the code cleaner. In fact, this change is not table-driven (emphasis

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

2014-03-17 Thread Dragos Foianu
Eric Sunshine sunshine at sunshineco.com writes: In fact, this change is not table-driven (emphasis on *driven*). It merely moves the strings into a table, but all the logic is still in the code. To be table-driven, the logic would be encoded in the table as well, and that logic would *drive*

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

2014-03-17 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 17, 2014 at 12:46 PM, Dragos Foianu dragos.foi...@gmail.com 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_()