Add merge_request.squash git push option
What does this MR do and why?
This MR adds support for configuring a MR to squash commits, with a new merge_request.squash
git push option.
Changelog: added
Closes #471590 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
With squash and without create
|
With squash +create
|
Resulting MR |
---|---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Clone a project from the GDK to your local computer
-
Create a new branch
-
Make a change in that branch and commit it
-
Push the change with the new option:
git push --set-upstream origin -o merge_request.create -o merge_request.squash
-
Open the resulting MR and confirm that the
Squash commits when merge request is accepted
merge option is enabled. -
You can try the same without specifying
merge_request.squash
to verify that the option is not applied in that case.