New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to return an exit code from --wait
invocations
#157961
Comments
Does it help to add |
@gjsjohnmurray Thanks for the suggestion! It does help partially. The command now returns when the file is closed. However, if I close the file without resolving the conflicts (e.g. by clicking the "Discard Merge Changes" button), the editor still exits with code 0 and Sourcetree thinks the conflicts have been resolved. |
@bpasero did you cover this case when you added the CLI option? |
There is no way to return an exit code from vscode/src/vs/code/node/cli.ts Lines 470 to 472 in eebdf81
Git command line in that case seems to ask if all conflicts have been resolved and does not just continue. I would also think that the presence of Git conflict markers is a good hint whether conflicts have been resolved or not. |
From https://www.git-scm.com/docs/git-mergetool
Looks like update the file and exit with code 0, while leaving conflicts in output file may cause issues. |
We show a big dialog to the user if the user wants to close the merge editor without resolving the conflicts, so it is less likely to happen, but I agree that |
--wait
invocations
This is also a problem for me with TortoiseGit. I configured VS Code with |
I also have a problem when running The rebase immediately succeeds and vscode fails to open git-rebase-todo (because it's already gone). The only way that works for sure is to use the default editor and then go open EDIT: Maybe rebase is not supposed to be managed in vscode. Also another strange bug occurs after messing with these configurations, if I try to open the git-rebase-todo file manually, vscode fails to open it and shows a warning modal:
Even though the file exists and I can open it with other editors (while editing it in vim). Only vscode fails to open it. |
I'm using Sourcetree as a git GUI and tried to set-up vscode as a three-way merge tool. Sourcetree expects that the tool will return a 0 on merge success and some error code on failure/abort. However, vscode returns 0 almost immediately, causing Sourcetree to delete the merge files.
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
code --disable-extensions -m --merge LOCAL.cpp REMOTE.cpp BASE.cpp OUTPUT.cpp
The text was updated successfully, but these errors were encountered: