configuring git extensions to use integrated kdiff when git uses diffmerge

4,656 views
Skip to first unread message

David Rees

unread,
Sep 27, 2011, 9:14:32 PM9/27/11
to GitExtensions
I have git on the command line configured to use diffmerge. Inside Git
Extensions I would like to use the integrated kdiff functionality
(where its shown actually inside the Git Extensions window). The Git
Extensions settings all show KDiff, but yet it still launches
DiffMerge. What else do I need to do to tell Git Extensions to use the
internal diff tool?

Thanks,
dave

Michael

unread,
Sep 27, 2011, 9:50:23 PM9/27/11
to GitExtensions
While the working directory in your bash shell is the application in
question, can you run the following command?

cat ~/.gitconfig

This should output your configuration settings for the command line.

In addition, can you be more specific about what is listed in the
GitExtensions settings, on the tab Global Settings?

David Rees

unread,
Sep 28, 2011, 9:24:04 AM9/28/11
to gitext...@googlegroups.com
Sure, should have thought to include that up front - sorry. Thanks.

[core]
        autocrlf = true
        filemode = false
        editor = git-editor.bat
        pager = cat
[diff]
        tool = diffmerge
        guitool = kdiff3
        external = diffmerge-diff.sh
[difftool "winmerge"]
        cmd = \"c:/Program Files/winmerge/winmergeu.exe\" \"$LOCAL\" \"$REMOTE\"
        path = c:/Program Files/winmerge/winmergeu.exe
[merge]
        tool = kdiff3
[rerere]
        enabled = true
[difftool "diffmerge"]
        cmd = diffmerge-diff.sh \"$LOCAL\" \"$REMOTE\"
[difftool]
        prompt = false
[mergetool "diffmerge"]
        cmd = diffmerge-merge.sh \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
        trustExitCode = false
[mergetool "winmerge"]
        cmd = winmerge-merge.sh \"$LOCAL\" \"$REMOTE\"
        trustExitCode = false
[mergetool "DiffMerge"]
        cmd = diffmerge-merge.sh \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
[mergetool "kdiff3"]
        path = C:/Program Files/KDiff3/kdiff3.exe
[difftool "kdiff3"]
        path = c:/Program Files/KDiff3/kdiff3.exe
        cmd = \"c:/Program Files/KDiff3/kdiff3.exe\" \"$LOCAL\" \"$REMOTE\"

And GitExt settings image is below....

d

Michael

unread,
Sep 28, 2011, 8:50:37 PM9/28/11
to GitExtensions
Hi David,
Here is what I have placed in my file:

[diff]
tool = DiffMerge
guitool = DiffMerge
[merge]
tool = DiffMerge
[mergetool "DiffMerge"]
path = C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe
cmd = sgdm --merge --result=\"$MERGED\"/n \"$LOCAL\" \"$BASE\"
\"$REMOTE\"
[difftool "DiffMerge"]
path = C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe
cmd = sgdm \"$LOCAL\" \"$REMOTE\"

For the command line:
git diff # outputs the difference in the console window
git difftool # outputs the difference in the DiffMerge tool

For the UI:
Select the Diff tab, select a file that has the pencil icon, push F3
and the DiffMerge tool should open
When merging, Start mergetool will launch DiffMerge as well.

Does this fix your settings?
> <https://lh4.googleusercontent.com/-yqeg_Y2C8Gk/ToMfusISdZI/AAAAAAAAAA...>

David Rees

unread,
Sep 29, 2011, 11:52:36 AM9/29/11
to gitext...@googlegroups.com
I actually want the opposite, I do NOT want DiffMerge to launch. Instead
I want the inline (inside window) diff as shown here -
http://code.google.com/p/gitextensions/. I find DiffMerge launching in a
separate window for every revision/file not that useful.

d

studgeek (David Rees)

unread,
Oct 4, 2011, 3:41:02 PM10/4/11
to gitext...@googlegroups.com
For now I have deleted all the diff/merge/difftool/mergetool entries in my gitconfig. That causes it to do a normal command line diff from the command line which causes gitextensions to show it inline. Since I use gitextensions for most of my diffing that works fine for me for now.

I do wonder what the point of the diff options are in the git extensions settings are though, since they don't seem to be used.

d
Reply all
Reply to author
Forward
0 new messages