Re:Git 2.9 released
by broodbucket on Thursday June 16, 2016 @09:10AM
(#11915816)
Does anyone know if this only works when displaying diffs, or when generating them? It'd definitely be nice if diffs were more readable when sent to mailing lists, i.e. from git format-patch.
[ Parent
| on HN ]
I'm fairly sure this applies only to the generating engine. (Otherwise it'd somehow need to reformat old diffs on the fly.)
Reformat old diffs? If you're under the impression that Git stores diffs you're mistaken. It stores the full file contents and delta-compresses them later.
Diffs in Git are purely a presentation format for human consumption.
> Diffs in Git are purely a presentation format for human consumption.
git format-patch says hi. Obviously the diff engine changes won't apply to already generated text diffs.
You can pipe an existing diff through diff-so-fancy or diff-highlight:
cat foo.diff | diff-so-fancy
I've never tried, but that's what the doc says.[time passes]
Oh yes, it seems to work. It doesn't do colors when I try it, but that's probably a misconfiguration on my side. It's how this is intended to be used.