Re: [PATCH 1/9] ref-filter: implement %(if), %(then), and %(else) atoms
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Oct 4, 2015, 08:02 UTC
- Message-ID
- <vpqr3lb6oy7.fsf@grenoble-inp.fr>
- In-Reply-To
- <xmqqpp0v3mzo.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes: > >> My take on it: >> >> Implement %(if), %(then) and %(else) atoms. Used as >> %(if)...%(then)...%(end) or %(if)...%(then)...%(else)...%(end). If the >> format string between %(if) and %(then) expands to an empty string, or >> to only whitespaces, then the string following %(then) is printed. >> Otherwise, the string following %(else), if any, is printed. > > I found all the suggestions very good, except that the distinction > between "expands to" and "is printed" bothers me a bit, as they want > to mean exactly the same thing (imagine this whole thing were inside > another %(if)...%(then)).
True. Then let me try again:
Implement %(if), %(then) and %(else) atoms. Used as %(if)...%(then)...%(end) or %(if)...%(then)...%(else)...%(end). If the format string between %(if) and %(then) expands to an empty string, or to only whitespaces, then the whole %(if)...%(end) expands to the string following %(then). Otherwise, it expands to the string following %(else), if any.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/