From: Jeff King Date: Sat, 10 Nov 2007 20:36:17 GMT Subject: Re: [PATCH 2/2] --pretty=format: on-demand format expansion Message-ID: <20071110203616.GA21098@sigill.intra.peff.net> In-Reply-To: On Sat, Nov 10, 2007 at 04:07:10PM +0000, Johannes Schindelin wrote: > > [...] 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.. > > ... which would not work (likely even segfault) if you work with the same > private data on different strbufs. The nice thing is that the cache validity only lasts for the call to strbuf_expand (and its callbacks), so there is really very little chance of somebody mis-using this. -Peff