On Tue, Apr 22, 2014 at 04:59:17PM +0700, Duy Nguyen wrote:
> On Sun, Apr 20, 2014 at 9:46 PM, Jeff King <p...@peff.net> wrote:
> > On Sun, Apr 20, 2014 at 04:58:28PM +0700, Duy Nguyen wrote:
> >> - --color-words within unified diff format, using background color to
> >> show what part of the line has changed. This is only enabled for
> >> 1-line changes.
> > See contrib/diff-highlight.
> Thanks. I'd rather have it built in core git still. I'll try to see if
> I can rewrite it in C. Else, any objection to promote it to a core
> helper and setup pager automatically? We can have a config key to turn
> it off, but if git diff is colored, then it could be on by default.
If you are going to write it as part of git, it would be interesting to
try using a real word-diff to find the inter-line changes, instead of
the "front and back match" heuristic that the script uses. I know there
are some cases that would look better, like:
but I suspect some cases would also look worse. It would be interesting
to experiment with, though.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html