-
Notifications
You must be signed in to change notification settings - Fork 411
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
cli split: Make jj split --parallel
set @ to the first revision
#5690
base: main
Are you sure you want to change the base?
Conversation
`jj split --parallel` now sets the working copy revision (`@`) to the first revision created by the split instead of the second. As a result, `@` remains on the same change id before and after the split. There is no good reason to choose the second commit as the working copy commit after a --parallel split. The only reason it works that way today is because doing that didn't require any code changes compared to the non parallel split. Martin proposed this change in the review for #5618.
Since non-parallel |
Yeah I actually thought about that as well, but I'm not sure if that's more useful or not. If you're splitting to stash the changes out of line, sort of like git stash, then it's probably not helpful. If you just want to parallelize the commits then it is. Curious to hear what other people think. I do like the consistency of preserving the working copy across the split. |
(Tangential to this PR) I assumed that if we're talking about keeping the change id and the bookmarks at the first commit for non-parallel split, the working copy would stay there too. It seems I was wrong re #5618 , but would that make sense? Update: We can move this discussion to #3419 (comment). |
Yeah, I was also wondering if we should do that, but it's also kind of weird that it creates an additional commit. I guess it would be this:
It's a bit weird that we end up in a empty commit. If we think of |
Right. I think non-parallel |
I have used it for moving out changes that were in the working copy into a separate change. |
Yeah, thinking about this again, the current behavior is actually fairly consistent. It might be suboptimal if people are using
Wait are you saying that we are planning to make |
Yes, but I was just confused about all the versions we've discussed. Sorry |
If we want it to behave like I agree that with Yuja that moving As far as adding an empty child of both the first and second commit, I think it's unnecessary. If the user wants to end up in this state, they can just create the new commit before splitting its parent. As far as other workspaces go, their working copy will remain intact until update-stale is run. If we decide to create a new empty commit to avoid updating the working copy after |
jj split --parallel
now sets the working copy revision (@
) to the first revision created by the split instead of the second. As a result,@
remains on the same change id before and after the split.There is no good reason to choose the second commit as the working copy commit after a --parallel split. The only reason it works that way today is because doing that didn't require any code changes compared to the non parallel split.
Martin proposed this change in the review for #5618.
Checklist
If applicable:
CHANGELOG.md