git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] builtin-commit: Include the diff in the commit message when verbose.

From
Jeff King <peff@peff.net>
Date
Nov 22, 2007, 11:13 UTC
Message-ID
<20071122111314.GE10389@sigill.intra.peff.net>
In-Reply-To
<Pine.LNX.4.64.0711221049350.27959@racer.site>
On Thu, Nov 22, 2007 at 10:52:04AM +0000, Johannes Schindelin wrote:
Show 5 quoted lines
> > +	/* 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
Previous: Johannes SchindelinNext: Junio C Hamano
Message 3 of 5 in “builtin-commit: Include the diff in the commit message when verbose.”
  1. builtin-commit: Include the diff in the commit message when verbose.Kristian Høgsberg, Nov 22, 2007
  2. Johannes SchindelinNov 22, 2007
  3. Jeff KingNov 22, 2007
  4. Junio C HamanoNov 22, 2007
  5. Kristian HøgsbergNov 26, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.