cygwin下的KDiff3不会调用git [英] KDiff3 under cygwin git will not invoke
问题描述
为了保持在互联网上发布的一些解决方案,我安装了KDiff3和修改 .gitconfig
如下使用它。尽管如此,当我在仓库中运行 git diff HEAD ^ HEAD
以测试它时,我得到一个由默认工具执行的差异。我在Windows7-64上运行cygwin git。任何人都可以解释为什么不调用KDiff3?
In keeping with a number of solutions posted on the internet I have installed KDiff3 and modified .gitconfig
as below to make use of it. Nonetheless, when I run git diff HEAD^ HEAD
within a repository to test it I get a diff performed by the default tool. I'm running cygwin git on Windows7-64. Can anyone explain why KDiff3 is not invoked?
[diff]
tool = kdiff3
[merge]
tool = kdiff3
[difftool "kdiff3"]
path = \"D:/Program Files (x86)/KDiff3/kdiff3.exe\"
keepBackup = false
trustExitCode = false
[mergetool "kdiff3"]
path = \"D:/Program Files (x86)/KDiff3/kdiff3.exe\"
keepBackup = false
trustExitCode = false
推荐答案
使用 git difftool
来调用配置的差异工具,而不是 git diff
。
Use git difftool
to invoke the configured diff tool, not git diff
.
由于你似乎使用的是cygwin git,而是一个原生的kdiff3,你可能还需要调用一个包装器脚本,而不是直接使用kdiff3,使用 cygpath
将路径从cygwin形式转换为本机形式。
Since you seem to be using cygwin git, but a native kdiff3, you'll probably also need to invoke a wrapper script, rather than kdiff3 directly, to use cygpath
convert paths from cygwin form to native form.
这篇关于cygwin下的KDiff3不会调用git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!