Correct octopus merge conflict message to show both tree IDs#12792
Merged
Correct octopus merge conflict message to show both tree IDs#12792
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Copilot
AI
changed the title
[WIP] [#12791] Fix issue with user notifications
Correct octopus merge conflict message to show both tree IDs
Mar 11, 2026
Byron
approved these changes
Mar 12, 2026
Collaborator
Byron
left a comment
There was a problem hiding this comment.
While this was only an armchair review, I think it's good. The tests cement the desired behaviour as well, and since we had a bug there it's fair to keep them.
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the octopus-merge conflict error message formatting in but-rebase by extracting the “previously merged trees” suffix logic into a helper and adding unit tests to pin the output.
Changes:
- Extracted conflict-details formatting into
merge_conflict_details(). - Updated the octopus merge conflict error to use the new helper.
- Added unit tests covering 0/1/2 successfully-merged-tree cases.
You can also share your feedback on Copilot code review. Take the survey.
0303438 to
72c4442
Compare
Co-authored-by: Byron <63622+Byron@users.noreply.github.com>
72c4442 to
ec9042a
Compare
mtsgrd
pushed a commit
that referenced
this pull request
Mar 12, 2026
Correct octopus merge conflict message to show both tree IDs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In the 2-parent merge conflict path of
octopus()(crates/but-rebase/src/merge.rs), the error message printed the same tree hash twice, which obscured which side actually conflicted. This updates the message construction so it reports the conflicting tree and the previously merged tree distinctly.Conflict detail formatting
merge_conflict_details(...).ours) instead of reusingtree_to_merge.Defensive behavior
merge_conflict_details(empty suffix), with inline context comment.Focused unit coverage
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.