merge_tools: add merge-tool-conflict-exit-codes option #4981
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some Git merge drivers can partially resolve conflicts, leaving some conflict markers in the output file. In that case, they exit with a code between 1 and 127 to indicate that there was a conflict remaining in the file (since Git uses a shell to run the merge drivers, and shells often use exit codes above 127 for special meanings such as exiting due to a signal):
https://git-scm.com/docs/gitattributes#_defining_a_custom_merge_driver
We should support this convention as well, since it will allow many Git merge drivers to be used with Jujutsu, but we don't run our merge tools through a shell, so there is no reason to treat exit codes 1 through 127 specially. Instead, we let the user specify which exact exit codes should indicate conflicts. This is also better for cross-platform support, since Windows may use different exit codes than Linux for instance.
Checklist
If applicable:
CHANGELOG.md