windows - 设置为 diff-highlight 的 Git 寻呼机在 Windows 10 中不起作用

标签 windows git pager

我已将 Git 的寻呼机选项设置为此

[pager]
    log = diff-highlight 

我从 Git's repository 3dbfe2b8 下载了 diff-highlight 脚本并将其放在我的 ~/bin 文件夹中。

$ where git
C:\Program Files\Git\cmd\git.exe
$ where diff-highlight
C:\Users\andy\bin\diff-highlight

运行 git log 会导致以下错误:

$ git log
Can't open diff-highlight: No such file or directory at C:\Users\andy\bin\diff-highlight line 36.
Segmentation fault

另一方面,下面的命令运行得很好,

$ git log -p --color | diff-highlight | less -FRSX

这意味着 diff-highlight 可以从 $PATH 获得,但是 Git 的配置找不到它。

我的 Git 版本是 2.12.0.windows.1

最佳答案

Recent guidance建议将整个 diff-highlight | less -FRSX 字符串到 pager.XXX 配置中。

虽然我只将它用于 pager.diffinteractive.diffFilter

关于windows - 设置为 diff-highlight 的 Git 寻呼机在 Windows 10 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42692840/

相关文章:

windows - 如何将消息路由到控件的标准 WNDPROC

提交压缩的 Git 发布分支

windows - 有没有办法在浏览器之外实现 OpenAuth 而无需诉诸黑客?

windows - panic : net: inconsistent fdMutex

windows - 批处理文件: How to Double Quote a Command/C when the command itself needs Quotes

perl - 如何自定义 git commit-msg Hook ?

visual-studio - 如何使用 Git 和 Git 扩展?

jQuery tablesorter 页面插件不起作用

git - 最初将 HEAD 聚焦在 git log 中

formatting - 如何在 jqgrid 寻呼机上的 viewrecord 中格式化数字?