在我的存储库中,如果我输入
$ git diff some-file
或者
$ git difftool some-file
我得到了终端差异显示。我认为这不应该发生,因为我已经设置了一个外部差异工具,如以下输出所示git config -l
:
$ git config -l
user.name=blah blah
user.email=blah blah
http.sslverify=true
diff.external=/home/daniel/bin/git-diff <--This is the important line
push.default=simple
core.filemode=false
core.editor=gedit
alias.tree=log --all --graph --decorate=short --color --format=format:'%C(bold blue)%h%C(reset) %C(auto)%d%C(reset)
%C(black)[%cr]%C(reset) %x09%C(black)%an: %s %C(reset)'
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
remote.origin.url=https://daniel@skynet/git/pyle.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.daniel.remote=origin
branch.daniel.merge=refs/heads/daniel
该diff.external
行中引用的 git-diff 文件如下所示
#!/bin/bash
meld $2 $5
为什么不git diff
调用融合?
如果我进行设置以便git config -l
具有以下行,我会得到相同的行为:
diff.tool = meld
或者
diff.external = usr/bin/meld
注意:我机器上的其他存储库没有这个问题。
相关但不等价的 SO 问题: