On Thu, Mar 13, 2014 at 4:35 PM, Eric Sunshine wrote:
> A more table-driven approach might look something
> like this:
>
> struct M { const char *s; const char **a1; const char **a2; }
> message[][2][2] = {{{
> { "Branch %s set ... %s ... %s", &shortname, &origin },
> ...
>
On Thu, Mar 13, 2014 at 2:34 PM, Junio C Hamano wrote:
> Eric Sunshine writes:
>
>> Shouldn't this logic [to decide what the printf arguments should
>> be] also be encoded in the table?
>> ...
>> The same argument also applies to computation of the 'name' variable
>> above. It too can be pushed i
Eric Sunshine writes:
> Shouldn't this logic [to decide what the printf arguments should
> be] also be encoded in the table?
> ...
> The same argument also applies to computation of the 'name' variable
> above. It too can be pushed into the the table.
Because the "printf argument" logic does not
On Wed, Mar 12, 2014 at 6:02 PM, Junio C Hamano wrote:
> Eric Sunshine writes:
>
>>> + if (origin && remote_is_branch)
>>> +
>>> printf_ln(_(message[!remote_is_branch][!origin][!rebasing]),
>>> + local, name, origin);
>>>
Eric Sunshine writes:
>> + if (origin && remote_is_branch)
>> +
>> printf_ln(_(message[!remote_is_branch][!origin][!rebasing]),
>> + local, name, origin);
>> else
>> - die("BUG: impossible com
On Tue, Mar 11, 2014 at 8:33 PM, Paweł Wawruch wrote:
> Replace the chain of if statements with table of strings.
>
> Signed-off-by: Paweł Wawruch
> ---
> The changes proposed by Junio C Hamano:
> Improvement of indentations. Removed an unused variable.
Better, thanks. More below.
> [1]: http:/
Replace the chain of if statements with table of strings.
Signed-off-by: Paweł Wawruch
---
The changes proposed by Junio C Hamano:
Improvement of indentations. Removed an unused variable.
[1]: http://thread.gmane.org/gmane.comp.version-control.git/243502
[2]: http://thread.gmane.org/gmane.comp.v
7 matches
Mail list logo