-
Notifications
You must be signed in to change notification settings - Fork 346
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
Splitting a parent of a merge commit results in weird changes to the commit graph #3483
Comments
|
IIRC a direct call to I can't really tell what's happening in Iyla's example, but it's clear that the uninvolved (i.e. not split) parents were dropped if you print a more complete graph before and after the split. I'll upload a fix. |
…ommit Ilya reported this in #3483. The bug was introduced in 9763207. Before this fix, `jj split` dropped any parents what weren't involved in the split when it rebased the children of the commit being split. This meant that any children which were merge commits lost their other parents unintentionally. Fixes #3483
Perhaps, the commit could be recorded as rewritten to two new commits? If the original commit had a branch, it will diverge. It's not ideal, but I think is technically correct. |
Ilya reported this in #3483. The bug was introduced in 9763207. Before this fix, `jj split` dropped any parents what weren't involved in the split when it rebased the children of the commit being split. This meant that any children which were merge commits lost their other parents unintentionally. Fixes #3483
Ilya reported this in #3483. The bug was introduced in 9763207. Before this fix, `jj split` dropped any parents what weren't involved in the split when it rebased the children of the commit being split. This meant that any children which were merge commits lost their other parents unintentionally. Fixes #3483
I'm pretty sure that I tried this when I first implemented Since then The docs for I'll try and see if I can get this to work, but if you have a specific suggestion that you think will work please let me know. |
Ilya reported this in #3483. The bug was introduced in 9763207. Before this fix, `jj split` dropped any parents what weren't involved in the split when it rebased the children of the commit being split. This meant that any children which were merge commits lost their other parents unintentionally. Fixes #3483
Divergence just means that there is more than one visible commit with the same change id, so that shouldn't be the case.
Oh, good point. I really should have thought about that myself since I made the change. I don't know if there's a better way of doing this then. I think I'm getting close to done with the rebase API refactoring. Hopefully this can be rewritten and simplified once that's done. |
I busted out the old Maybe it's better to fix with the current PR and rewrite when the API changes are complete? |
Ilya reported this in #3483. The bug was introduced in 9763207. Before this fix, `jj split` dropped any parents what weren't involved in the split when it rebased the children of the commit being split. This meant that any children which were merge commits lost their other parents unintentionally. Fixes #3483
Ilya reported this in #3483. The bug was introduced in 9763207. Before this fix, `jj split` dropped any parents what weren't involved in the split when it rebased the children of the commit being split. This meant that any children which were merge commits lost their other parents unintentionally. Fixes #3483
Thank you all very much! This is far less subtle than I expected, it doesn't explain other issues I think I was seeing. I thought we'd have a test for this and, well, now we do :). |
~~Actually, no, we don't have that test. I'll hopefully remember to add it ~~ Update: The test will be there after #3488. |
Steps to Reproduce the Problem
I'm very curious if others can reproduce this.
UPDATE: I might replace the
jj-bug
repo shortly; the bug turned out to be simply about splitting any parent of any merge commit anyway.jj git clone --colocate https://github.com/ilyagr/jj-bug
(Get a perfectly organized and orderly repo 🤣 )cd jj-bug
jj branch track 'glob:*@origin'
Then:
What happened to all the other parents of
ilya
?Specifications
jj 0.16.0+20240405-fd26902376c1dc96
The text was updated successfully, but these errors were encountered: