#1628 Rebase automatically when merge if patch can be rebased
Closed: Fixed Opened by cqi.

I want to keep the commit history clean without too many merge commits, Each time, I use git push --force to update rebased commits before merge. If pagure can do it automatically after clicking Merge button, it must be much convenient for me, and others?

This could be an optional behavior along with other existent options, 1) always merge 2) the normal merge behavior.


I thought there already was a ticket for this but I can't find it right now.

Basically, I really wish that was possible, however pygit2, the library we use to interact with git, does not seem to know how to do rebase (or even the equivalent of git am). So while I would love being able to stop asking people to rebase before I merge their PRs, it looks like we're both stuck with this for now :(

Slightly related: https://pagure.io/pagure/issue/836

I want to ask that the importance of this is raised as it hurts our experience for developers who are going through longer review processes.

Unfortunately the last time I checked, pygit2 still doesn't support it, even though libgit2 itself seems to. So we would need to add it to pygit2.

JFTR, https://github.com/libgit2/pygit2/issues/693

Metadata Update from @pingou:
- Issue assigned to pingou

Metadata Update from @pingou:
- Issue set to the milestone: 5.2

I have something, but it won't be automatic: http://ambre.pingoured.fr/public/Screencast_pagure_rebase.webm

PR implementing this webcast has been merged: https://pagure.io/pagure/pull-request/4016

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

Metadata