2

I'm trying to set up a diff tool for Visual Studio Code with the following configuration settings:

[diff]
    tool = winmerge
[difftool "winmerge"]
    cmd = \"C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe\" \"$LOCAL\" \"$REMOTE\"
[merge]
    tool = winmerge
[mergetool "winmerge"]
    cmd = \"C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe\" -merge -result=\"$PWD/$MERGED\" \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\"
    trustExitCode = true
[mergetool]
    keepBackup = false

...but when I right click a file that requires merging and select "Open Changes in diff tool", nothing happens.

If I remove that section, I get a warning that no diff tool has been set up, so I know it's reading the configuration. And the file path is definitely correct.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
DShultz
  • 4,381
  • 3
  • 30
  • 46

1 Answers1

1

First, you should not need to escape everything, notably for LOCAL and REMOTE.
For instance:

[difftool "winmerge"]
    cmd = "'C:/Program Files (x86)/WinMerge/WinMergeU.exe'" -e "$LOCAL" "$REMOTE"

Second, check if wrapping the WinMerge call works better in your case.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250