-
Notifications
You must be signed in to change notification settings - Fork 392
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 --empty-parent
and --empty-child
to jj split
#1167
Conversation
60d05e4
to
eee2323
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach (adding options to jj split
) looks fine to me, but we should wait for @martinvonz and/or @yuja to comment.
I think there's an annoying change needed to which commit gets which change id. There's no reason to fix that unless we officially settle on this approach. Other than that, this looks good to me; I just have some minor take-it-or-leave-it comments.
My main concern with |
I feel the same. Functionality wise, these |
7fdf901
to
9c7eb43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving this to get rid of the annoying red "changes requested" marker. Please don't merge it without an OK from others.
CHANGELOG.md
Outdated
@@ -104,6 +104,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
and `jj split any-non-existent-path` inserts an empty commit between the | |||
target commit and its parents. | |||
|
|||
* jj split gained new `--empty-parent` and `--empty-child` options. They | |||
allow inserting an empty parent before or after an empty child after the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a comma and has too many "after"s. "an empty parent before, or an empty child after..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
9c7eb43
to
c6d2d9d
Compare
c6d2d9d
to
e0d5177
Compare
I'll close this one, for the time being |
Following the discussion in #1155, I tried an implementation of
--empty-parent
(-P
) and--empty-child
(-C
) withjj split
. They do not prompt for a description: the non-empty change keeps the original description and change id. The empty change gets an empty description and a new change id.The fact that the non-empty commit keeps the change id when using
--empty-parent
differs from what is done withjj split nonexistent
, but it seems more logical to me. I've done this in a separate commit as to be able to revert it easily if needed.Checklist
If applicable:
CHANGELOG.md