Preview autosquashed merge request
Large and complex merge requests often need multiple rounds of reviews and fixups. Rewriting history while code reviews are happening makes the process more difficult for everyone, and very hard to track the evolution of a merge request. A solution to this is fixup!
and squash!
commits which can be used with git rebase --autosquash
once the merge request is complete. The downside is that this results in a very confusing commit list which can't be reviewed commit by commit.
Reality | Goal |
---|---|
If I'm the the third code reviewer, how do I do a commit by commit review when there are all the fix up commits? But if I rebase it means reviewers can't see the evolution of changes.
We should use a new ref (e.g. refs/squashed_merge_request/<id>
) to test if autosquash will succeed and store the results and show them in the merge request.
Proposal
Add a new mode to the commit list if there are fixup!
or squash!
commits to preview the final commits.