1. Right click on an unstaged file > Resolve Conflicts > Launch External Merge Tool
2. Externa tool is opened, SourceTree shows "Visual Merge In Progress" window with Abort button
3. After I click Abort and close external, SourceTree moves the unstaged file to staged files and in unstaged file new ".orig" file is left
My expectation is that since I aborted the the conflick resolution, it should leave the file in unstaged section. Right now I have to manually mark the file as unresolved. Also, if there are multiple files in Staged files, it is sometimes hard to find the file.
I tried reporting this as a bug but your bug tracking website does not allow me to do that - the Create issue window has only Cancel button...
Hello! This is a result of the return code your merge-tool is returning back to Git. You can read more about this here
It just closes the dialog and terminates the process. I assume git then updates the index when your tool closes.
You can see the same behavior Sourcetree does by doing the following via the terminal:
git mergetool -y --tool=YOUR_MERGE_TOOL -- YOUR_FILE_NAME
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It just closes the dialog and terminates the process. I assume git then updates the index when your tool closes.
It does not terminate the process. Tested with p4merge and with WinMerge. I have to close the tool myself. To me it looks like the button does nothing.
git mergetool -y --tool=YOUR_MERGE_TOOL -- YOUR_FILE_NAME
Yes you are right, git behaves in the same way. In the config I see following:
mergetool.sourcetree.cmd='C:/Program Files/Perforce/p4merge.exe' "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
After running:
git mergetool -y --tool=sourcetree -- myfile
and closing p4merge window and choosing not to save changes, the file is indeed moved to staged.
So I understand that SourceTree is simply calling git to do the merge resolution using mergetool, and I'd have the same issue if I was using git directly.
Still, is there no way to abort a conflict resolution using external tool, in a way that the file is not staged and that it's still marked as having unresolved conflict?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am having the same issue. Is there a way to tell git to leave the file unresolved? When the external merge tool aborted or otherwise did not complete the merge.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe there's something similar to setting git config
mergetool.<tool>.trustExitCode
to 0/false in Sourcetree?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.