why vsdiffmerge alway open a new VisualStudio and not show the diff
Asked Answered
V

1

9

I want to use vsdiffmerge as git diff tool. And I set the .git/config below.

[diff]
    tool = vsdiffmerge
[difftool]
      prompt = true
[difftool "vsdiffmerge"]
      cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsDiffMerge.exe\" \"$LOCAL\" \"$REMOTE\" //t
      keepbackup = false
      trustexistcode = true
[merge]
      tool = vsdiffmerge
[mergetool]
      prompt = true
[mergetool "vsdiffmerge"]
      cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsDiffMerge.exe\" \"$LOCAL\" \"$REMOTE\" //t //m
      keepbackup = false
      trustexistcode = true

I find it can work well some times but it will open a new VisualStudio and not show the diff tab. I try delete the //t but not help.

I want to ask two question:

  1. How to make the vsdiffmerge open the diff tab in the opening VisualStudio?

  2. How to use git diff multi-file once that I dont want to input all file to y. I see the number of files is 133 that I should press 133 y.

Vachel answered 9/11, 2017 at 2:19 Comment(3)
Did you find a solution to this problem?Stratus
@Stratus Sorry I can not findVachel
I can confirm that this issue still exists in VS 2022 (I use vsDiffMerge with TortoiseSVN). Sometimes it uses the existing instance of VS, and sometimes it opens the diff window in the existing instance of VS and then starts a second instance of VS with the same diff window. Very annoying.Hideous
S
1

The commands for difftool and mergetool should be a little different:

Try this:

  • Difftool Command: /t "$LOCAL" "$REMOTE"

  • MergeTool Command: /m /t "$LOCAL" "$REMOTE" "$BASE" "$MERGED"

Here is an example for Visual Studio 2019 but it should be similar for Visual Studion 2017:

difftool.vsdiffmerge.path=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/vsDiffMerge.exe
difftool.vsdiffmerge.cmd=/t "$LOCAL" "$REMOTE"
mergetool.vsdiffmerge.path=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/vsDiffMerge.exe
mergetool.vsdiffmerge.cmd=/m /t "$LOCAL" "$REMOTE" "$BASE" "$MERGED"

I use/lunch this from from GitExtensions but it should be very similar from other git Client apps.

Stratus answered 9/1, 2020 at 10:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.