我使用一个名为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"
在添加和签出代码时,我的正常工作流程也通常使用--patch
and标志。--interactive
但是,该--patch
开关似乎使用默认值(colordiff?)而不是 diffr。
在这种情况下(以及我可能没有想到的任何其他工具),我如何强制 diffr 作为 diff 工具?