Reputation: 11
I am using git with the default Ubuntu 12.04 packages:
git --version git version 1.7.9.5
I cannot find any mechanism that works to get git diff to open the external diff tool it seems to completely ignore any setting that I use. I finally tried to force it to use my tool by using
git -c diff.external=/home/john/bin/git-meld diff --ext-diff
but that did not work either (still invoking diff --cc)
I have also tried setting GIT_EXTERNAL_DIFF as well as trying git diftool --tool=meld (which also strangely invokes diff -cc). I am completely stumped as to why my diff tool settings are being ignored by git. I find the diff -cc output inscrutable because I have been using GUI diff tools for so long.
Should I try updating to a newer git?
Thanks for any help! John
My git config settings are below:
git config -l
user.name=jmicco [email protected] diff.external=/home/john/bin/git-meld diff.tool.external=/home/john/bin/git-meld core.editor=emacs core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.fetch=+refs/heads/:refs/remotes/origin/ remote.origin.fetch=refs/notes/:refs/notes/ remote.origin.url=ssh://[email protected]:29418/jmicco/allowance-app remote.origin.pushurl=ssh://[email protected]:29418/jmicco/allowance-app remote.origin.push=HEAD:refs/for/master branch.master.remote=origin branch.master.merge=master remote.gerrit.url=ssh://[email protected]:29418/jmicco/allowance-app remote.gerrit.fetch=+refs/heads/:refs/remotes/gerrit/ remote.gerrit.fetch=refs/notes/:refs/notes/ remote.gerrit.pushurl=ssh://[email protected]:29418/jmicco/allowance-app remote.gerrit.push=HEAD:refs/for/master gerrit.createchangeid=true
Upvotes: 0
Views: 1070
Reputation: 4190
Try:
GIT_EXTERNAL_DIFF="/bin/echo" git diff
It should print something like:
foo.c /tmp/T1NuN5_foo.c 240b63429c3267f8141ee0f33be9d12fc46216d3 100755 foo.c 0000000000000000000000000000000000000000 100755
Then everything is ok with your git version.
diff.external=/home/john/bin/git-meld
is an invalid setting. Git expects the external diff program to recognize the git-specific arguments and produce a standard diff output. Meld won't do that.
I think you need git difftool -t meld
Upvotes: 1