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

Re: [2.22.0] difftool no longer passes through to git diff if diff.tool is unset

From
Jeff King <peff@peff.net>
Date
Jun 20, 2019, 05:21 UTC
Message-ID
<20190620052125.GA12434@sigill.intra.peff.net>
In-Reply-To
<20190620024517.GA24321@archbookpro.localdomain>
On Wed, Jun 19, 2019 at 10:45:17PM -0400, Denton Liu wrote:
Show 7 quoted lines
> Using the following command on git.git,
> 
> 	$ HOME=/dev/null ./git --exec-path=. difftool --no-index color.c color.h
> 
> I did a quick bisect on the issue and it seems like the cause of this
> bug is actually 287ab28bfa (diff: reuse diff setup for --no-index case,
> 2019-02-16). I'll do a bit more digging tomorrow.

I don't know much about how git-difftool works, but it looks like it sets GIT_EXTERNAL_DIFF=git-difftool--helper.

Prior to 287ab28bfa, we would not have respected any external diff command when running git-diff. But after it, we do.

In the case that he user has not provided --no-index, then this all works as I guess difftool is meant to: it runs the helper and says "hey, you have not configured this".

It seems like the behavior of the above command prior to 287ab28bfa was not intentional. It would run git-diff, expecting it to trigger the helper, but it never did (and instead just did a normal no-index diff).

So it seems like the new behavior is actually the right thing, as it makes the --no-index case consistent with the regular one? I'm not at all clear why you would run "difftool" here if you it is not configured and you just want the straight diff output.

-Peff
Previous: Denton LiuNext: Pugh, Logan
Message 4 of 8 in “[2.22.0] difftool no longer passes through to git diff if diff.tool is unset”
  1. Pugh, LoganJun 19, 2019
  2. Denton LiuJun 20, 2019
  3. Denton LiuJun 20, 2019
  4. Jeff KingJun 20, 2019
  5. Pugh, LoganJun 20, 2019
  6. Jeff KingJun 25, 2019
  7. Pugh, LoganJun 25, 2019
  8. Jeff KingJun 26, 2019

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.