1

I use an offbeat diff tool called diffr, like this:

diffr="diffr \
      --colors removed:background:00:foreground:01 \
      --colors refine-removed:background:0:foreground:124 \
      --colors added:background:0:foreground:10 \
      --colors refine-added:background:0:foreground:35:intense \
      | less -R"

git config --global pager.diff "$diffr"
git config --global pager.show "$diffr"
git config --global pager.log "$diffr"

My normal workflow also commonly makes use of the --patch and --interactive flags when adding and checking out code.

However, the --patch switch appears to use the default (colordiff?) and not diffr.

How can I coerce diffr as the diff tool in this context (and any others I may not be thinking of)?

causaSui
  • 166
  • 9

1 Answers1

0

Sometimes all you have to do to find the answer is ask the question.

The solution is:

git config --global interactive.diffFilter "$diffr" 
causaSui
  • 166
  • 9
  • 1
    An explanation would however be welcome, or at least just a link to the [doc](https://git-scm.com/docs/git-config#Documentation/git-config.txt-interactivediffFilter). – Romain Valeri Nov 04 '19 at 23:51