Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

add --rebase flag to mr merge #390

Closed
maxice8 opened this issue Dec 22, 2020 · 3 comments
Closed

add --rebase flag to mr merge #390

maxice8 opened this issue Dec 22, 2020 · 3 comments
Labels
cmd: mr Issue is related to merge request management enhancement New feature or request stale

Comments

@maxice8
Copy link
Collaborator

maxice8 commented Dec 22, 2020

Describe the feature or problem you'd like to solve
At alpine/aports we need all commits to be rebased against master before merging so there are no merge commits and we have a nice linear history (see screenshot below)

image

It would be very convenient to have a flag --rebase or preferably a way to automatically rebase whenever a merge request needs it due to the situation above.

Propose a Solution
Have a flag --rebase that does the equivalent of glab mr rebase before doing the merge itself

Additional context
This helps with a race condition where a rebase might end before and the attempt to merge after another person has pushed.

  1. Start rebase
  2. Rebase finishes
  3. Someone pushes to trunk or merge another MR
  4. Attempt to merge
  5. Has to rebase again because of 3

having --rebase while not completely eliminating the race condition (unlike GitHub does with the rebase method for merging a pull request) greatly reduces the possibility of it happening.

@maxice8 maxice8 added the enhancement New feature or request label Dec 22, 2020
@profclems profclems added the cmd: mr Issue is related to merge request management label Dec 23, 2020
@clemsbot
Copy link
Collaborator

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@clemsbot clemsbot added the stale label Mar 10, 2021
@profclems profclems removed the stale label Mar 10, 2021
@clemsbot
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.

@clemsbot clemsbot added the stale label Apr 10, 2021
@profclems
Copy link
Owner

This is resolved by #695

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cmd: mr Issue is related to merge request management enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

3 participants