smarkets / marge-bot

A merge-bot for GitLab
BSD 3-Clause "New" or "Revised" License
693 stars 136 forks source link

Use `--rebase-merges` when rebasing #345

Closed d3m3vilurr closed 2 years ago

d3m3vilurr commented 2 years ago

Pick patch from #274 & fix unittests

This patch is useful in limitted environments. For example, if a project uses the subtree, rebase command will break directory structure. (subtree will make the patchset in same as original repo tree then move the directory in merge commit.)

I just checked that this patch is keepping merge commits.

Related #280

d3m3vilurr commented 2 years ago

it can't fix subtree's problem that rebase action still lost prefix of subtree. imo, a best shot is just pass the git rebase target --strategy subtree in my case, it could make a different result as --rebase-merges --strategy subtree also lost some part of the prefix.