2

I was trying to resolve some merging conflicts in git using diffmerge, which I just set op on my machine, but it fails and thie error appears:

Hit return to start merge resolution tool (diffmerge):
C:\Program Files (x86)\Git/libexec/git-core/mergetools/diffmerge: line 136: diffmerge: command not found
merge of nextclue_input.cpp failed

Here are the contents of the file the path is pointing at:

diff_cmd () {
    "$merge_tool_path" "$LOCAL" "$REMOTE" >/dev/null 2>&1
}

merge_cmd () {
    if $base_present
    then
        "$merge_tool_path" --merge --result="$MERGED" \
            "$LOCAL" "$BASE" "$REMOTE"
    else
        "$merge_tool_path" --merge \
            --result="$MERGED" "$LOCAL" "$REMOTE"
    fi
    status=$?
}

And here is how I setup my .gitconfig file for diffmerge:

[merge]
    tool = diffmerge
[mergetool "diffmerge"]
    cmd = diffmerge --merge --result=$MERGED $LOCAL $BASE $REMOTE
    trustExitCode = true
[diff]
    tool = diffmerge
[difftool "diffmerge"]
    cmd = diffmerge $LOCAL $REMOTE

I don't understand please help.

Pontiacks
  • 1,118
  • 2
  • 13
  • 23

1 Answers1

3

Likely diffmerge isn't in %PATH%. Try to specify a full path to the command in mergetool.diffmerge.cmd and difftool.diffmerge.cmd (cmd settings 2nd and 4th sections)

user3159253
  • 16,836
  • 3
  • 30
  • 56
  • Yes! Thank you, I solved it by putting this in the config file `` [merge]
    tool = diffmerge [mergetool "diffmerge"] cmd = C:/Program\\ Files/SourceGear/Common/DiffMerge/sgdm.exe --merge --result=$MERGED $LOCAL $BASE $REMOTE trustExitCode = true [diff] tool = diffmerge [difftool "diffmerge"] cmd = C:/Program\\ Files/SourceGear/Common/DiffMerge/sgdm.exe $LOCAL $REMOTE ``
    – Pontiacks Jan 17 '15 at 14:12