All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Anselm Schüler" <mail@anselmschueler.com>
Cc: git@vger.kernel.org
Subject: Re: Questions about --ext-diff
Date: Mon, 24 Aug 2026 14:23:02 -0400	[thread overview]
Message-ID: <20260824182302.GA177524@coredump.intra.peff.net> (raw)
In-Reply-To: <1c1567ec-c81a-45be-8b92-2c995dd34c16@anselmschueler.com>

On Fri, Aug 21, 2026 at 01:13:13PM +0200, Anselm Schüler wrote:

> I’m unsure what the purpose of --ext-diff is. It seems to me that custom
> diff filters should just always be executed.
> 
> Is --ext-diff a security feature? It seems like it isn’t, since git-diff
> will happily execute the diff filter.
> 
> Maybe I don’t correctly understand what a diff filter is intended to be used
> for. What situation would you want a diff filter to be run by git-diff, but
> not by e.g. git-show?

The external diff is free to do whatever it likes; it doesn't even have
to generate text output. It could open a gui window, for example. So it
may be surprising if you run git-log and suddenly dozens of windows open
as we walk through history.

For git-show, there's certainly an argument that it ought to use the
same default as git-diff (since we are showing about one commit's worth
of diffs in either case). I suspect nobody really though much about it,
and as git-show is implemented as (roughly) "git log --no-walk" under
the hood, it inherited the defaults to disallow external diffs.

For many cases, I think textconv is a better experience. It is less
flexible (you must be able to transform the binary into something
textual, which is then diffed). But because of that it fits more neatly
into existing commands. I may be biased as the author of textconv,
though. ;)

-Peff

  reply	other threads:[~2026-08-24 18:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 11:13 Questions about --ext-diff Anselm Schüler
2026-08-24 18:23 ` Jeff King [this message]
2026-08-24 20:25   ` Junio C Hamano

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=20260824182302.GA177524@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=mail@anselmschueler.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.