mergetool from .gitconfig being ignored?
Asked Answered
A

2

8

git config --global mergetool.bc3 "\"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\""

git mergetool

/usr/lib/git-core/git-mergetool--lib: line 116: bcompare: command not found

This is extremely odd, because both ./.git/config and ~/.gitconfig look correct. Neither lists an entry for bcompare. Can git read or store configuration from anywhere other than .git/config or ~/.gitconfig?

Amazonite answered 15/9, 2011 at 17:26 Comment(0)
G
15

Looks like the same issue as this guy had. It appears bc3 is a builtin tool name, and git won't allow that name to be overridden. Try using a name other than bc3.

I used "BeyondCompare3"

[mergetool "BeyondCompare3"]
    path = C:/Program Files/Beyond Compare 3/bcomp.exe
    cmd = \"C:/Program Files/Beyond Compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
Gazetteer answered 15/9, 2011 at 17:48 Comment(1)
That exactly explains what was going on.Amazonite
R
0

If you need to override the path for a merge tool, you just need to set the variable mergetool.<tool>.path.

Custom merge tools can be specified with mergetool.<tool>.cmd (which shouldn't be necessary for Beyond Compare 3) but a variable of the form mergetool.<tool> has no meaning for git mergetool. If you were directed to try this from the documentation perhaps you can say where so this can be fixed.

Rancid answered 15/9, 2011 at 18:27 Comment(1)
It's necessary if you're running out of cygwin.Amazonite

© 2022 - 2024 — McMap. All rights reserved.