The diff-highlight
Perl contrib script produces output so similar to that of the Trac screenshots that it is likely that Trac is using it:
Install with:
wget https://raw.githubusercontent.com/git/git/fd99e2bda0ca6a361ef03c04d6d7fdc7a9c40b78/contrib/diff-highlight/diff-highlight && chmod +x diff-highlight
Move the file diff-highlight
to the ~/bin/
directory (or wherever your $PATH
is), and then add the following to your ~/.gitconfig
:
[pager]
diff = diff-highlight | less
log = diff-highlight | less
show = diff-highlight | less
Single copy paste install suggested by @cirosantilli:
cd ~/bin
curl -O https://raw.githubusercontent.com/git/git/fd99e2bda0ca6a361ef03c04d6d7fdc7a9c40b78/contrib/diff-highlight/diff-highlight
chmod +x diff-highlight
git config --global pager.log 'diff-highlight | less'
git config --global pager.show 'diff-highlight | less'
git config --global pager.diff 'diff-highlight | less'
git config --global interactive.diffFilter diff-highlight
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…