Re: [PATCH 0/2] Support diff.wordDiff config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey list,

On 02-03-2024 18:03, Junio C Hamano wrote:
Karthik Nayak <karthik.188@xxxxxxxxx> 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?

Of course it is :p as a human, I crave it :p

On a slightly more serious note though, I always have to use an alias, or the command line option I cannot use `git diff` with this as default. From a human UX point of view, this is odd, and we have tons of configuration options to do exactly what is desired, without aliases.

I suppose the deeper discussion would be, do we distinct between user (human) facing options and arguments, and machine facing options and argument (in theory, yes we do; in practice things get abused).

Git is often blamed due to its horrible UX. I think the problem comes from the deeper issue mentioned above. Because things get abused, they can no longer be touched, not even to improve UX for the human.

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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux