Re: [PATCH 0/2] Support diff.wordDiff config
- From
Kristoffer Haugsbakk <code@khaugsbakk.name>
- Date
- Mar 2, 2024, 19:57 UTC
- Message-ID
- <34bb249d-4a4d-4cc7-b737-bb18398341d0@app.fastmail.com>
- In-Reply-To
- <CAOLa=ZR6tN8eQhByaUobj3kS9wwYegsOQNT8cjZYA-YATJJt7w@mail.gmail.com>
Hi
On Sat, Mar 2, 2024, at 19:02, Karthik Nayak wrote:
Show 16 quoted lines
> On Sat, Mar 2, 2024 at 6:03 PM Junio C Hamano <gitster@pobox.com> wrote: >> >> 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? > > This is definitely a good question to ask. I'm primarily not a user of this > option, and this patch series was more of to start this discussion, based > on the request. I'm comfortable dropping the patch series too if it doesn't > make much sense.
This looks similar to the discussion from a [stash] topic:
• Proposed introducing config variables which change how `git stash push` and `git stash save` behave (what they save) • Concern about how that could break third-party scripts
Like here it would be opt-in. But the user might have no idea what kind of scripts/programs that they use that happen to use git-stash(1).
(That’s at least how I read the thread)
I guess the concern might be worse for git-stash(1) since it seems very natural to use that command in scripts in order to deal with a working tree that might be in a who-knows condition: just get these things out of the way so I can do what I want.
🔗 [stash]: https://lore.kernel.org/git/xmqq34tnyhhf.fsf@gitster.g/
-- Kristoffer Haugsbakk