fix(ng-dev): run autosquash dry-run in mergeability check#3717
Merged
josephperrott merged 2 commits intoJun 3, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request overrides the check method in AutosquashMergeStrategy to dry-run an interactive autosquash rebase, ensuring that conflicts caused by the squashing process are caught before merging. Feedback points out that performing the rebase leaves the working tree dirty or checked out on a temporary branch, as git update-ref in the finally block only updates the ref pointer without restoring the working tree or index. It is recommended to capture the original checked-out branch or revision before the rebase and restore it using git checkout -f in the finally block.
157714d to
26e519a
Compare
alan-agius4
approved these changes
Jun 2, 2026
To accurately determine if an autosquash merge will succeed, we must first dry-run the autosquash rebase during the mergeability check. The default check method relies on git cherry-pick, which applies fixups sequentially rather than squashing them, causing it to falsely pass even if there are squash-related conflicts.
26e519a to
cd365a6
Compare
Member
Author
|
This PR was merged into the repository. The changes were merged into the following branches:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To accurately determine if an autosquash merge will succeed, we must first dry-run the autosquash rebase during the mergeability check. The default check method relies on git cherry-pick, which applies fixups sequentially rather than squashing them, causing it to falsely pass even if there are squash-related conflicts.