1

我使用一个名为diffr的另类差异工具,如下所示:

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"

在添加和签出代码时,我的正常工作流程也通常使用--patchand标志。--interactive

但是,该--patch开关似乎使用默认值(colordiff?)而不是 diffr。

在这种情况下(以及我可能没有想到的任何其他工具),我如何强制 diffr 作为 diff 工具?

4

1 回答 1

0

有时,要找到答案,您所要做的就是提出问题。

解决方案是:

git config --global interactive.diffFilter "$diffr" 
于 2019-11-04T23:27:23.413 回答