Small documentation change on rebase.rs#12579
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
119df75 to
e7d7cf4
Compare
Caleb-T-Owens
left a comment
There was a problem hiding this comment.
Hi!
There are semantics around how we cherry-pick conflicted commits that expect the "theirs" tree to represent the user's content. If we wanted to swap tree usage, we would need to update all the locations where we write conflicted commits and all the places where we cherry-pick conflicted commits, along with some form of backward compatibility.
For now, I'd suggest updating the comments and leaving the tree writing as is.
Ah thanks. Do you know offhand where in the code this is enforced? I tried looking and the closest I got was in crates/but-rebase/src/cherry_pick.rs |
The function has some potentially unexpected behavior which would be too costly to change, so just document it. (If we have a way to represent conflicted commits agreed upon by GitButler and other projects, we could change the behavior here, since we would already have to pay the cost of migration, but that time is not yet.)
6fc50f4 to
ba1f764
Compare
I took a further look and it seems that the parent IDs are written in the form I would expect, but the trees are swapped. Like you said, I don't think we can swap the trees to the order I would expect (swapping the parents to match the trees is out of the question, I believe). I've updated the PR to only document the existing behavior. |
Updated the PR to only contain a comment describing existing behavior.
Why I'm not autosubmitting: @Caleb-T-Owens could you take a look? These look reasonable to me but I just wanted a second opinion, especially 'rebase: "our" is target, "their" is incoming '. The rationale for both changes are in their respective commit messages.There are some test differences that I don't quite understand, but note how inconflicting_merge, the results now match the comments.