I'd like to git diff
and combine the regular line-by-line diff with git diff --word-diff
. The problem with line-by-line diffs is that they're unnecessary if I change one or two words and leave the line mostly intact--the chunking is too coarse. On the other hand if I change entire lines and use --word-diff
, sometimes the diff algorithm will get confused and spit out incredibly confusing diffs, with lots of words inserted and deleted to "morph" one line into another.
Is there a way to specify that git
should be smart about this and only --word-diff
if it actually makes sense to do so (on a line-by-line basis, of course)?