To illustrate the problem: see diff
the only diff in this paragraph (starting with A macro that needs
is whitespace differences (newlines inserted / removed in certain places);
- when running
git diff
it shows the paragraph before in red and paragraph after in red, making it hard to spot the difference - when running
git diff --word-diff
, it shows the paragraph after in gray and doesn't show the whitespace changes - when running
git diff --word-diff-regex=.
it shows the whitespace changes (great!) but [EDIT] it does character by character diff which is often unreadable as it mixes letters from different words to minimize the diff, eg:git show --word-diff-regex=. 4a720394bba39ce1e67d518b909cbb1c25f63d09
[- * patch compile-]r [-so `isM-]a[-inModule`-] [-is true when -d:isMainModuleIsAlwaysTr-]{+m+}u[-e-] [- T-]{+c+}h[-at'll give speedup-] be[-nefi-]t[-, and we don'-]t[- hav-]e{+r+} [-to p-]{+w+}a[-tch stdlib files-]{+y+}. ]#
What I want is an option to show whitespace differences while running --word-diff
(or --word-diff-regex), eg via {+ +}
and [- -]
; Note: for --word-diff=color
would be nice to show these to, eg also via {+ +}
and [- -]
since otherwise these would disappear.
Note: I'm using colors in my gitconfig.
Note: this doesn't help since whitespace differences are not shown in output of git diff --word-diff=porcelain