vscode-as-git-mergetool icon indicating copy to clipboard operation
vscode-as-git-mergetool copied to clipboard

Git mergetool failed with exitcode 128.

Open Obehi opened this issue 5 years ago • 6 comments

Steps to reproduce

  1. Install git mergetool
  2. Click start git mergetool from the git panel

Expected behavior

Open merge tool without error message

[Optional] screenshots

image

image

Environment

  • Version of the extension: v0.10.0
  • Operating system: MacOS Catalina V10.15.6
  • VS Code version [use Code command “Help: About”]: 1.49.2
  • Other installed extensions (if applicable): GitLens, Git Graph

Additional context

Obehi avatar Oct 01 '20 09:10 Obehi

What happens when you open a terminal, cd to the root of the affected repository, and manually run the command git mergetool?

zawys avatar Oct 01 '20 10:10 zawys

image

Ive never tried using mergetool from terminal, but looks like its working?

Obehi avatar Oct 01 '20 11:10 Obehi

I agree. Those warnings look weird but probably have nothing to do with git mergetool and are probably a pipe reuse issue with VS Code / NodeJS.

Would it be possible for you to compress the repository in the failing state and email it to: [email protected] ?

I am working on version 1.0 of the extension which shall make it possible to avoid git mergetool but that might still take some days until I can publish it.

zawys avatar Oct 01 '20 11:10 zawys

When you run git mergetool from terminal, is the merge conflict opened in VS Code?

zawys avatar Oct 01 '20 11:10 zawys

Sorry, its the repository for my work, so my boss would kinda hate me if I shared it. But I tested it on a new repo and it works. The merge conflict is opened in vscode yea.
Either way, I am more than happy to wait for the v1.0, so no worries :)

Obehi avatar Oct 01 '20 17:10 Obehi

I'm facing the same issue.

I tried to configure the mergetool in my git settings but not sure if this is correct since the documentation doesn't mention this part (I was using KDiff3 before so I let the config I was using in my example)

I don't use VS Code for C# programming (I use Visual Studio) and I always use git from the command line. After performing a git merge develop on my current branch I had conflicts so I ran code . to open the current directory in VS Code then ran the command Start git mergetool from the palette and got the error mentionned in this ticket.

Here is my .gitconfig

[merge]
	tool = VSCode
[mergetool]
	keepTemporaries = false
	keepBackup = false
[mergetool "kdiff3"]
	path = C:/Program Files/KDiff3/kdiff3.exe
	trustExitCode = false
[mergetool "VSCode"]
	path = C:/Users/username/AppData/Local/Programs/Microsoft VS Code/Code.exe"
	trustExitCode = false

Could you please provide us a more detailed Installation section in the Readme?

Thank you

EDIT:

Actually running the git mergetool command directly in the terminal told me the problem: my .gitconfig file was invalid because of an extra " I forgot to delete.

Now I've another issue is that running the Start git mergetool command opens a terminal and ask me to launch the diff merge with Tortoise Merge... I need to figure that out because I never configured this tool in my .gitconfig

jmevel avatar Dec 01 '21 09:12 jmevel