git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Denton Liu <liu.denton@gmail.com>
Cc: "Pugh, Logan" <Logan.Pugh@austintexas.gov>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [2.22.0] difftool no longer passes through to git diff if diff.tool is unset
Date: Thu, 20 Jun 2019 01:21:25 -0400	[thread overview]
Message-ID: <20190620052125.GA12434@sigill.intra.peff.net> (raw)
In-Reply-To: <20190620024517.GA24321@archbookpro.localdomain>

On Wed, Jun 19, 2019 at 10:45:17PM -0400, Denton Liu wrote:

> 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

  reply	other threads:[~2019-06-20  5:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19 23:54 [2.22.0] difftool no longer passes through to git diff if diff.tool is unset Pugh, Logan
2019-06-20  1:17 ` Denton Liu
2019-06-20  2:45   ` Denton Liu
2019-06-20  5:21     ` Jeff King [this message]
2019-06-20 19:29       ` Pugh, Logan
2019-06-25 21:35         ` Jeff King
2019-06-25 23:09           ` Pugh, Logan
2019-06-26 18:08             ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190620052125.GA12434@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Logan.Pugh@austintexas.gov \
    --cc=git@vger.kernel.org \
    --cc=liu.denton@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).