Re: [PATCH v4 2/7] pretty: allow %(trailers) options with explicit value

2019-02-02 Thread Оля Тележная
чт, 31 янв. 2019 г. в 21:47, Anders Waldenborg : > > > Оля Тележная writes: > >> Oh my. I wasn't aware that there was a totally separate string > >> interpolation implementation used for ref filters. That one has > >> separated parsing, making it more amenable to good error handling. > >> I wonder

Re: [PATCH v4 2/7] pretty: allow %(trailers) options with explicit value

2019-01-31 Thread Anders Waldenborg
Оля Тележная writes: >> Oh my. I wasn't aware that there was a totally separate string >> interpolation implementation used for ref filters. That one has >> separated parsing, making it more amenable to good error handling. >> I wonder if that could be generalized and reused for pretty formats. >

Re: [PATCH v4 2/7] pretty: allow %(trailers) options with explicit value

2019-01-29 Thread Anders Waldenborg
Jeff King writes: > There's some small value in leaving > %X alone if we do not understand "X" (not to mention the backwards > %compatibility you mentioned), but I think %() is a pretty > deliberate indication that a placeholder was meant there. Good point. > We already do this for ref-filter e

Re: [PATCH v4 2/7] pretty: allow %(trailers) options with explicit value

2019-01-29 Thread Jeff King
On Tue, Dec 18, 2018 at 10:30:04PM +0100, Anders Waldenborg wrote: > > Junio C Hamano writes: > > That way, we can handle %(trailers:only=bogo) more sensibly, > > no? Syntactically we can recognize that the user wanted to give > > 'bogo' as the value to 'only', and say "'bogo' is not a boolean"

Re: [PATCH v4 2/7] pretty: allow %(trailers) options with explicit value

2018-12-18 Thread Anders Waldenborg
Junio C Hamano writes: > That way, we can handle %(trailers:only=bogo) more sensibly, > no? Syntactically we can recognize that the user wanted to give > 'bogo' as the value to 'only', and say "'bogo' is not a boolean" if > we did so. I agree that proper error reporting for the pretty formattin

Re: [PATCH v4 2/7] pretty: allow %(trailers) options with explicit value

2018-12-10 Thread Junio C Hamano
Anders Waldenborg writes: > In addition to old %(trailers:only) it is now allowed to write > %(trailers:only=yes) s/$/. Similarly the unfold option can take a boolean./ > By itself this only gives (the not quite so useful) possibility to have > users change their mind in the middle of a formatt

[PATCH v4 2/7] pretty: allow %(trailers) options with explicit value

2018-12-08 Thread Anders Waldenborg
In addition to old %(trailers:only) it is now allowed to write %(trailers:only=yes) By itself this only gives (the not quite so useful) possibility to have users change their mind in the middle of a formatting string (%(trailers:only=true,only=false)). However, it gives users the opportunity to ov