forked from martinvonz/jj
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This mostly reverts martinvonz#2901 as well as its fixup martinvonz#2903. The related bug is reopened, see martinvonz#2869 (comment). The problem is that while the fix did fix martinvonz#2896 in most cases, it did reintroduce the more severe bug martinvonz#2760 in one case, if the working copy is the commit being rebased. For example, suppose you have the tree ``` root -> A -> B -> @ (empty) -> C ``` ### Before this commit #### Case 1 `jj rebase -s B -d root` would work perfectly before this commit, resulting in ``` root -> A \-------B -> C \- @ (new, empty) ``` #### Case 2 Unfortunately, if you run `jj rebase -s @ -d A`, you'd have the following result (before this commit), which shows the reintroduction of martinvonz#2760: ``` root -> A @ -> C \-- B ``` with the working copy at `A`. The reason for this is explained in martinvonz#2901 (comment). ### After this commit After this commit, both case 1 and case 2 will be wrong in the sense of martinvonz#2896, it will not exhibit the worse bug martinvonz#2760. Case 1 would result in: ``` root -> A \-------B -> @ (empty) -> C ``` Case 2 would result in: ``` root -> A -> @ -> C \-- B ``` with the working copy remaining a descendant of A
- Loading branch information
Showing
2 changed files
with
32 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters