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

fix(rewrite): fix cases of moving all parents of merge commits #915

Merged
merged 1 commit into from Apr 25, 2023

Conversation

arxanas
Copy link
Owner

@arxanas arxanas commented Apr 22, 2023

Closes #912.

@arxanas arxanas force-pushed the arxanas/rewrite branch 4 times, most recently from 0670cf1 to 0ad89f7 Compare April 22, 2023 21:33
The existing implementation of `collect_descendants` was from a time before the segmented changelog DAG, and it didn't handle certain merge commits correctly (as can be determined from the fact that `parent_oids` never has more than one parent). Fortunately, we can remove the old recursive implementation and use the segmented changelog DAG instead.

Many of the merge commit issues were documented by @claytonrcarter in his thorough testing of `git reword`, for which we can now remove the `FIXME` comments from the test code 😊.

There was also a bug where we failed to apply the children of a merge commit by indiscriminately returning `Ok(acc)` after finishing the application of the merge commit, which is also fixed in this commit.
@arxanas arxanas marked this pull request as ready for review April 23, 2023 00:29
@arxanas arxanas merged commit 30a2fc2 into master Apr 25, 2023
13 checks passed
@arxanas arxanas deleted the arxanas/rewrite branch April 25, 2023 05:11
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.

git move drops merge commits (and their descendants)
1 participant