Re: [PATCH 2/5] merge-recursive: porcelain messages for checkout
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Aug 9, 2010, 20:52 UTC
- Message-ID
- <vpq4of3se4v.fsf@bauges.imag.fr>
- In-Reply-To
- <7vhbj34kz8.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> Matthieu Moy <Matthieu.Moy@imag.fr> writes:
>
>> +void set_porcelain_error_msgs(const char **msgs, const char *cmd)
>> {
>> + const char *msg;
>> + char *tmp;
>> + const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches";
>
> This may have implications to the later i18n effort, but lets ignore it
> for now. I don't think it will be too bad.Note that the ? : construct just allows factoring out two messages, but one can easily distinguish all cases and give the complete error message in the source (we don't care about performance/memory here, it's a one-time thing).
So, yes, that's easily fixable later if it causes problems to i18n.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/