After reading through Configuring diff tool with .gitconfig, I setup my ~/.gitconfig
to contain the following:
[diff]
tool = bbdiff
[difftool "bbdiff"]
cmd = /usr/local/bin/bbdiff --wait --resume "$LOCAL" "$REMOTE"
But when I run git difftool
or git difftool somefile.ext
, I just get the diff dumped to stdout (in color). How do I figure out why bbdiff isn't being invoked?
Note I'm using macOS 10.15.6 with its default zsh and git version 2.28.0.
Update: (with answers to questions in the comments)
responding to zrzka's second comment:
✗ git config -l | fgrep diff
diff.tool=bbdiff
difftool.bbdiff.cmd=/usr/local/bin/bbdiff --wait --resume $LOCAL $REMOTE
responding to zrzka's third comment:
✗ git difftool --tool-help
'git difftool --tool=<tool>' may be set to one of the following:
opendiff
vimdiff
vimdiff2
vimdiff3
user-defined:
bbdiff.cmd /usr/local/bin/bbdiff --wait --resume $LOCAL $REMOTE
The following tools are valid, but not currently available:
araxis
...
Update #2:
Just in case it's related, I don't know why all git commands I run in iTerm (or Terminal) are piped through less
. git branch
and git diff
both stop after one page and h
brings up "SUMMARY OF LESS COMMANDS". But git difftool
is not piped through less
.
Update #3:
As suggested by zrzka's comment, I created /usr/local/bin/foo
:
✗ cat /usr/local/bin/foo
#!/usr/bin/env bash
echo "Foo $@"
✗ ll /usr/local/bin/foo
-rwxr-xr-x 1 dspitzer admin 34B Aug 13 13:09 /usr/local/bin/foo
And I configured it in my .gitconfig
:
✗ cat ~/.gitconfig
[user]
name = Daryl Spitzer
email = dspitzer@xxx.xxx
[pager]
diff = false
[diff]
tool = foo
[difftool]
prompt = false
[difftool "foo"]
cmd = /usr/local/bin/foo "$LOCAL" "$REMOTE"
But git difftool
just outputs to stdout.
Q: Does git have a log somewhere?