Re: [PATCH for "next"] pretty-formats: add 'format:<string>'
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 23, 2007, 18:38 UTC
- Message-ID
- <Pine.LNX.4.63.0702231935560.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <7vabz44tgh.fsf@assigned-by-dhcp.cox.net>
Hi,
On Fri, 23 Feb 2007, Junio C Hamano wrote:
Show 17 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > >> > The supported placeholders are: > >> > > >> > '%H': commit hash > >> >... > >> > '%b': body > >> > >> Hmmm. Would we want to make them somehow interoperable with > >> git-for-each-ref format atoms? > > > > But those placeholders are so long! Not even GNU date supports such > > long placeholders... And I could not reuse interpolate.[ch] as is for > > that. > > What I was hinting at was to fix (or extend) for-each-ref to accept > these short-and-sweet placeholders.
Ah, the other way round...
Show 9 quoted lines
> >> Also, it _might_ be worthwhile to do something like "%+4b" which > >> means "indent each line of this field with 4 spaces", for a > >> multi-line field like "%b". > > > > Same goes here: interpolate.[ch] does not (yet) allow for that. > > Nah, if you feel it is too much work, I trust your judgement (I > do not recall details of how interpolate.c does its thing). I > do not think it's worth it.
Sure, it _would_ be nice to let interpolate call back, instead of having to fill a table with static strings (xstrdup()ing them, no less).
However, I want to go play Snooker tonight, so this is up-for-grabs.
Ciao, Dscho