Re: [PATCH 2/2] --pretty=format: on-demand format expansion
- From
Jeff King <peff@peff.net>
- Date
- Nov 10, 2007, 20:36 UTC
- Message-ID
- <20071110203616.GA21098@sigill.intra.peff.net>
- In-Reply-To
- <Pine.LNX.4.64.0711101605560.4362@racer.site>
On Sat, Nov 10, 2007 at 04:07:10PM +0000, Johannes Schindelin wrote:
Show 6 quoted lines
> > [...] 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