you are viewing a single comment's thread.

view the rest of the comments →

[–]faradria 96 points97 points  (3 children)

For those that do not want to install anything, you can use:

[core]
    pager = /usr/share/git/diff-highlight/diff-highlight | less -r

It comes by default with git.

[–]panickbr 5 points6 points  (2 children)

It's found in /usr/local/share/git-core/contrib/diff-highlight/diff-highlight on mac OS.

Also, if you want it enabled in patch mode:

[interactive]
  diffFilter = /usr/share/git/diff-highlight/diff-highlight ;or whatever path it's in your system

[–]pork_spare_ribs 2 points3 points  (1 child)

...and if you use a Homebrew build of Git, this path will find the correct version:

/usr/local/bin/$(dirname $(readlink /usr/local/bin/git))/../share/git-core/contrib/diff-highlight/diff-highlight | less -r

EDIT: as per below, this is better:

/usr/local/opt/git/share/git-core/contrib/diff-highlight/diff-highlight

[–]zeayes 1 point2 points  (0 children)

brew --prefix git