git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: oliver@schinagl.nl,  git@vger.kernel.org
Subject: Re: [PATCH 0/2] Support diff.wordDiff config
Date: Sat, 02 Mar 2024 09:03:53 -0800	[thread overview]
Message-ID: <xmqqedcszhty.fsf@gitster.g> (raw)
In-Reply-To: <20240302095751.123138-1-karthik.188@gmail.com> (Karthik Nayak's message of "Sat, 2 Mar 2024 10:57:49 +0100")

Karthik Nayak <karthik.188@gmail.com> writes:

> This patch series adds the diff.wordDiff config option. This mimics the
> '--word-diff' option of `git-diff(1)`.

Is it even be sensible to introduce this configuration variable in
the first place?  What would this do to users who set this variable
and use third-party or their own scripts that run "git diff" under
the hood?

The usual answer is "these tools should be using the low-level
plumbing commands like diff-files, diff-index, and diff-tree", so I
am not worried about it too much myself, and the above is purely the
devil's advocate comment.

Having said that, running

	$ git grep -e 'git diff '

in the collection of scripts I use [*] to work on this project, I am
reminded that I may have to be a bit more conservative than I
currently am about the risk of breaking scripts with the changes
like the one being proposed.

The proposed feature also may break those who use the git-prompt and
diff-highlight available in conrib/, even though I am not sure how
badly they would break, because I only looked at the lines given by
this command:

	$ git grep -e 'git diff ' -- \*.sh ':!t/'

and didn't check how the output from 'git diff' is used.


[Footnote]

 * They can be seen in the 'todo' branch, if anybody is interested.

  parent reply	other threads:[~2024-03-02 17:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28  8:54 Allow setting diff.worddiff=color via gitconfig Olliver Schinagl
2024-03-02  9:57 ` [PATCH 0/2] Support diff.wordDiff config Karthik Nayak
2024-03-02  9:57   ` [PATCH 1/2] t4034: extract out `diff_with_opts` Karthik Nayak
2024-03-02  9:57   ` [PATCH 2/2] diff: add 'diff.wordDiff' config option Karthik Nayak
2024-03-02 10:25     ` Eric Sunshine
2024-03-02 18:02       ` Karthik Nayak
2024-03-02 19:57     ` Jean-Noël AVILA
2024-03-02 17:03   ` Junio C Hamano [this message]
2024-03-02 18:02     ` [PATCH 0/2] Support diff.wordDiff config Karthik Nayak
2024-03-02 19:57       ` Kristoffer Haugsbakk
2024-03-03  7:23         ` Chris Torek
2024-03-03 17:45           ` Junio C Hamano
2024-03-22 22:08             ` Olliver Schinagl
2024-03-25 21:53               ` Dragan Simic
2024-03-22 22:05           ` Olliver Schinagl
2024-03-22 21:59       ` Olliver Schinagl
2024-03-22 21:57     ` Olliver Schinagl

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=xmqqedcszhty.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    --cc=oliver@schinagl.nl \
    /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).