Skip to content
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

Add a --siblings option to the jj split command #3037

Merged
merged 2 commits into from
Apr 1, 2024
Merged

Conversation

emesterhazy
Copy link
Contributor

@emesterhazy emesterhazy commented Feb 13, 2024

If the --siblings option is used, the target commit is split into two sibling commits instead of parent and child commits. Any children of the original commit will have both siblings as their new parents.

#2274

@emesterhazy emesterhazy marked this pull request as ready for review March 31, 2024 01:33
@emesterhazy emesterhazy changed the title WIP: Add a --siblings option to the jj split command Add a --siblings option to the jj split command Mar 31, 2024
@emesterhazy emesterhazy requested a review from martinvonz March 31, 2024 01:42
cli/src/commands/split.rs Show resolved Hide resolved
cli/src/commands/split.rs Outdated Show resolved Hide resolved
cli/src/commands/split.rs Outdated Show resolved Hide resolved
@emesterhazy emesterhazy force-pushed the push-sxvnsknzvxku branch 2 times, most recently from 985c1f0 to 4c5db0a Compare April 1, 2024 16:13
cli/src/commands/split.rs Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
cli/src/commands/split.rs Show resolved Hide resolved
This refactor will allow us to reuse new `rebase_descendants` function for the
`jj split --siblings` feature (#2274) and later possibly for `jj parallelize`
(#1079).
@emesterhazy emesterhazy force-pushed the push-sxvnsknzvxku branch 3 times, most recently from 320efd6 to 5049074 Compare April 1, 2024 23:01
If the --siblings option is used, the target commit is split into two sibling
commits instead of parent and child commits. Any children of the original
commit will have both siblings as their new parents.


#2274
@emesterhazy
Copy link
Contributor Author

I made a couple of minor tweaks, including adding the commit summary back to the instructions since I don't think I meant to delete it. I also fixed a couple of new conflicts with main.

After this is submitted I'm going to mail another PR that adds test coverage for splitting a commit with branches. Currently the branches move to the second commit, but I know we're discussing whether the branches should stay with the original commit instead. I'll probably open a new issue to move that discussion to and then close the FR for jj split --siblings.

@emesterhazy emesterhazy merged commit 9763207 into main Apr 1, 2024
16 checks passed
@emesterhazy emesterhazy deleted the push-sxvnsknzvxku branch April 1, 2024 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants