unable to launch Git Difftool

1,234 views
Skip to first unread message

K

unread,
Aug 2, 2011, 5:25:40 AM8/2/11
to msysGit
Hello,

Today I run into a problem that Git Difftool cannot be launched and
with and error message.

I am using Win7 with portable version 1.7.6 preview. Beyond compare 3
as my external diff tool

to replicate the error is simple

just run a git difftool command in either git-bash or git-cmd shell an
error occur: with the following message:
/libexec/git-core/git-mergetool--lib: line 129: bcompare: command not
found

No problem when I use portable version 1.7.4. Beyond Compare launches
and runs properly.

======= Here' my global config file. i have removed my email and name
there =======
[user]
name = xxxxxxx
email = xxx...@xxxx.com
[apply]
whitespace = nowarn
[core]
editor = \"E:/Software/Portable Apps/Editor/notepad++/unicode/notepad+
+.exe\" -multiInst -nosession -noPlugin
autocrlf = false

[diff]
tool = bc3
[difftool "bc3"]
cmd = \"E:/Software/Portable Apps/Beyond Compare/Beyond Compare 3/
BComp.exe\" \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[merge]
tool = bc3
[mergetool "bc3"]
cmd = \"E:/Software/Portable Apps/Beyond Compare/Beyond Compare 3/
BComp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
trustExitCode = true
=============

Many thanks
Chris

Heiko Voigt

unread,
Aug 3, 2011, 12:41:49 PM8/3/11
to K, msysGit, Sebastian Schuberth
Hi,

On Tue, Aug 02, 2011 at 02:25:40AM -0700, K wrote:
> Today I run into a problem that Git Difftool cannot be launched and
> with and error message.
>
> I am using Win7 with portable version 1.7.6 preview. Beyond compare 3
> as my external diff tool
>
> to replicate the error is simple
>
> just run a git difftool command in either git-bash or git-cmd shell an
> error occur: with the following message:
> /libexec/git-core/git-mergetool--lib: line 129: bcompare: command not
> found

Having a look at commit ffe6dc Sebastian added bc3 as a builtin diff
tool.

mergetool--lib: Add Beyond Compare 3 as a tool

It seems that you can not override an inbuilt tool by configuration so
it tries to execute the command 'bcompare' there. Two possible
solutions:

1. You rename your custom diff tool to something else than bc3

2. You provide a patch that adds the ability to override builting tools.

I do not know whether not being able to override builtin diff tools was
a deliberate choice. So you might need to dicuss this on the main git
mailing list.

Sebastian do you know more about this?

Cheers Heiko

Sebastian Schuberth

unread,
Aug 3, 2011, 1:28:59 PM8/3/11
to Heiko Voigt, K, msysGit
On Wed, Aug 3, 2011 at 18:41, Heiko Voigt <hvo...@hvoigt.net> wrote:

> I do not know whether not being able to override builtin diff tools was
> a deliberate choice. So you might need to dicuss this on the main git
> mailing list.

Overriding a built-in tool should not be necessary in any case as you
still can specify an explicit path using the "difftool.<tool>.path"
config variable if the tool is not in your PATH environment. I'm
obviously using Beyond Compare myself (as a diff tool; I use a
different merge tool), and you should configure it like this:

----8<----

[diff]
tool = bc3
[difftool "bc3"]

path = c:/Program Files (x86)/Beyond Compare 3/BCompare.exe

----8<----

That's it, just replace "cmd" with "path" and get rid of the
arguments. It's the same for the mergetool, and you can remove the
"trustExitCode" there, too.

--
Sebastian Schuberth

K Gateway

unread,
Aug 4, 2011, 1:31:24 AM8/4/11
to Sebastian Schuberth, Heiko Voigt, msysGit
Hello Sebastian and Heiko,

Many thanks for both of your prompt responses.

I followed Sebastian's instruction and the problem is resolved.

Many thanks and have a good day
Chris
Reply all
Reply to author
Forward
0 new messages