From: Jeff King Date: Thu, 22 Nov 2007 11:13:14 GMT Subject: Re: [PATCH v2] builtin-commit: Include the diff in the commit message when verbose. Message-ID: <20071122111314.GE10389@sigill.intra.peff.net> In-Reply-To: On Thu, Nov 22, 2007 at 10:52:04AM +0000, Johannes Schindelin wrote: > > + /* Sigh, the entire diff machinery is hardcoded to output to > > + * stdout. Do the dup-dance...*/ > > I wonder how much effort it would be to change that. Not that it would > help too much, since we want the output in a strbuf anyway. An "emit"-type callback would be nice and elegant. The biggest trick is that there are a lot of formatting calls, so you'd need your callback signature to be a variadic function. But it's probably do-able. -Peff