From: Jeff King Date: Sat, 10 Nov 2007 20:34:35 GMT Subject: Re: [PATCH 2/2] --pretty=format: on-demand format expansion Message-ID: <20071110203435.GB20592@sigill.intra.peff.net> In-Reply-To: <47359221.7090707@lsrfire.ath.cx> On Sat, Nov 10, 2007 at 12:12:33PM +0100, René Scharfe wrote: > Yes, the two are independent. I don't like the malloc()'s in your > patch, though, and have cooked up a different one on top of a cleaned up > version of mine. It plays the dirty trick of reading expansions of > repeated placeholders from the strbuf.. Yes, the mallocs would obviously not be necessary for the commit parsing, since we already have a buffer, but I assumed they would be for the abbreviations. Your solution leaves me partly disgusted at the hackishness, and partly delighted at the cleverness. I think the way you have coded it is quite clear, though, so I don't think anyone is likely to get confused reading it. I haven't read through it carefully yet, but a tentative Ack from me. -Peff