-
Notifications
You must be signed in to change notification settings - Fork 376
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
jj rebase -r
should be able to rebase a commit onto its descendant, insert commits before or after another commit (now AKA better tools for reordering commits part 1)
#1188
Comments
Since the usecase for this is to reorder commits, we probably also want to add a I just thought I'd mention that here, but I don't think we need that option in order to consider this feature implemented. |
jj rebase -r
should be able to rebase a commit onto its descendantjj rebase -r
should be able to rebase a commit onto its descendant (now AKA better tools for reordering commits part 1)
#1531 depends on this. |
jj rebase -r
should be able to rebase a commit onto its descendant (now AKA better tools for reordering commits part 1)jj rebase -r
should be able to rebase a commit onto its descendant, insert commits before or after another commit (now AKA better tools for reordering commits part 1)
#1188 There are some additional test changes because children and descendants are now rebased before the commit itself.
I ended up here after being frustrated at how hard it is to reorder commits. I had a feature proposal (see below), and I thought to look for other issues where this is discussed. My feature proposal: Instead of extending
can currently be done as
Personally I think that extending
|
@gasche: I think the most important reason not to use |
I think that both
@martinvonz, I'm not sure about this and I'm worried this might create a bunch of weird edge cases where branches move unexpectedly. I was going to punt on this, at least at first. Vague thoughts: This could be considered independently from
@gasche, this is a good question. Currently, for this reason, I was going to focus on A behavior I was thinking of would be to make Separate, loosely related, thought: after the basic |
I'm not actively working on this ATM, it seems best to wait until the DescendantRebaser is refactored somewhat. |
I created an initial PR for this in #3396. |
jj rebase -r B -d D
should work forA->B->C->D
jj rebase -r B --insert-after C
jj rebase -r B --insert-before D
The latter two were suggested below in #1188 (comment) and on Discord.
Older description
Conceptually, this shouldn't be a problem.
In practice, this is less trivial than it might sound and may require careful changes to some rebase primitives. Simply removing the relevant check causes a panic because of a cycle in the graph in the
test_rebase_invalid
test intest_rebase_command.rs
.@martinvonz also noted the following difficulty on Discord (likely related, and certainly will need to be tested):
The text was updated successfully, but these errors were encountered: