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

Re: diff attribute ignored by show and log -p

From
Jeff King <peff@peff.net>
Date
Dec 17, 2009, 20:24 UTC
Message-ID
<20091217202459.GC11367@sigill.intra.peff.net>
In-Reply-To
<76718490912170844i7d5f25d1hc32590b877dbf295@mail.gmail.com>
On Thu, Dec 17, 2009 at 11:44:16AM -0500, Jay Soffian wrote:
Show 8 quoted lines
> > The need to give --ext-diff is mentioned in 72909be (Add diff-option
> > --ext-diff, 2007-06-30) but its log message doesn't 'explain' why external
> > diff isn't used by default and you need to pass that extra option.
> 
> "To prevent funky games with external diff engines, git-log and
> friends prevent external diff engines from being called."
> 
> Seemed reason enough to me.

I don't remember discussing it at that time, but much later when touching the external diff code and adding textconv, Junio and I came to the conclusion that textconv was reasonable to do as part of "git log -p", as the result is just an internal conversion that still results in a text diff. Whereas an external diff might be terribly confusing, as it could be spawning graphical viewers or producing output which does not match well with the log output.

> > Probably --ext-diff should be the default?
> 
> Or available via a config option anyway.

If you were going to do such a config option, it might make sense to make it an attribute of the diff driver rather than a global "use external diff". Then each diff driver could say "Yes, I am reasonable to be run as part of log -p".

-Peff
Previous: Jay Soffian
Message 5 of 5 in “diff attribute ignored by show and log -p”
  1. Jay SoffianDec 17, 2009
  2. Jay SoffianDec 17, 2009
  3. Nanako ShiraishiDec 17, 2009
  4. Jay SoffianDec 17, 2009
  5. Jeff KingDec 17, 2009

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.