#584 Always commit a merge
Closed: Fixed Opened by pingou.

Currently if a PR can be fast-forwarded, pagure will just do that.

However, some person likes to know who merged the PR and therefore like the idea of having a merge commit for every PR merged.

So we should add a project's setting allowing to always_commit_on_PR_merge or so :)


For inspiration: Gerrit has a config option for this and the options are:

  • Fast Forward Only
  • Merge if Necessary
  • Rebase if Necessary
  • Always merge
  • Cherry-pick

For the FF only setting, it would also be helpful to be able to do a rebase directly on the web (assuming there are no conflicts).

So the problem is that currently we have no way of doing a rebase automatically, pygit2 doesn't support it and we would have to do it manually :-/

Since we can't, the approach/settings I'm thinking of is:

  • Always do a merge commit: this is similar to what github does, there is always a merge commit no matter if the branch can be FF'ed or not
  • Keep things as they are now: the merge button tells you if the PR can be FF'ed, Merged or Conflicts, from this you can ask the submitter to rebase if necessary.

You could show a FF-only way and just disable the merge button if it's not a fast forward.

@puiterwijk, I'll go with: the status of the PR (FF/Merge/Conflict) is clear enough that if people only want FF, they can and can ask to rebase :)

So, I won't block the Merge Button for this. Always having a Merge commit is a different story though, since there can be a Merge commit event on a FF-able PR :)

Well, I would really like a way to disable the merge button for non-FF merges, but thta's a different issue perhaps.

Implemented in https://pagure.io/pagure/pull-request/727

Metadata