Re: [PATCH v4] install_branch_config: simplify verbose messages logic
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 12, 2014, 22:02 UTC
- Message-ID
- <xmqqob1bjcti.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAPig+cTmdF06PrWboJFNFEGKLCa=3rmGrcPusSsYZxdtfSEewA@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 12 quoted lines
>> + if (origin && remote_is_branch)
>> + printf_ln(_(message[!remote_is_branch][!origin][!rebasing]),
>> + local, name, origin);
>> else
>> - die("BUG: impossible combination of %d and %p",
>> - remote_is_branch, origin);
>> + printf_ln(_(message[!remote_is_branch][!origin][!rebasing]),
>> + local, name);
>
> Shouldn't this logic also be encoded in the table? After all, the
> point of making the code table-driven is so that such hard-coded logic
> can be avoided. It shouldn't be difficult to do.Hmph. Is it even necessary in the first place? Does it hurt if you give more parameters than the number of placeholders in the format string?