Hello folks,

I have stumbled upon this several times before, and today again. And since we have switched to Pagure, I think it's time to discuss this (again?)... :)

IMHO, the package maintainers should be allowed to make, delete and force-push into private/auxiliary branches. Disabling completely the deletion & force-pushing on all branches is IMHO PITA for many maintainers, because it distorts the common git workflow...

I - as a maintainer - want often to create an auxiliary branch where I will do some changes, do a git rebase/amend/etc. that requires a force-push later - to keep the git commits clean and not messy, and once I think the whole branch is clean enough and ready, then I will merge it into master (or some other main branch). Or I can decide at some point to completely drop all the changes from that private/auxiliary branch, or start again differently in other private/auxiliary branch...

In any case this requires for me to have the ability to be able to do force-push and deletion of the auxiliary branches which I create just for that purpose. Currently I don't have this ability in Pagure either, and it is starting to produce a mess in branches in git repositories for my packages. (I often forget that I can't currently delete the already pushed branch, and it will just "hang" in the git repository indefinitely.)

Therefore, I want to propose this:
 1) Package maintainers (main admin, admin, committer roles in Pagure) will have the right to create private/auxiliary branches in git repository belonging to that package.
 2) Each package maintainer will have the ability to only do 'git push --force' into the branch that he/she has created before. (No force-push into private/auxiliary branch of other package maintainers.)
 3) Each package maintainer will have the ability to only do 'git push --delete origin <branch>' into the branch that he/she has created before. (No deletion of private/auxiliary branch of other package maintainers.)
 4) In case a package maintainer will require a deletion of private/auxiliary branch of other package maintainer, he/she will have to request this (in Pagure?). Only allowed Pagure admins (or somebody else with proper authorization) could do it after the request was approved. (This situation might occur in case some previous maintainer is no longer maintaining the package, but his old private/auxiliary branches are still present in the git repository.)
 5) The default branches for Fedora releases (f<number>, like 'f26', and 'master' branch) will still remain protected against force-push and deletion unconditionally.
 6) Each main admin and admin of the package will have right to set each private/auxiliary branch as "protected", thus blocking force-push and deletion of that particular branch.

This is just a mock-up idea, the details of this would have to be discussed in more details. The main questions about this are:
 A) Would you guys welcome this option - to do force-push and deletion of private/auxiliary branches?
 B) Would it be feasible to implement this in our Pagure infrastructure?

I do realize that this will become more complicated with Modularity project, but I still think it would be feasible to adapt this approach even to changes which Modularity brings.

I welcome any feedback! Thanks for it in advance! ;)

Best regards,

David Kaspar [Dee'Kej]
Associate Software Engineer

Brno, Czech Republic


RED HAT | TRIED. TESTED. TRUSTED.
Every airline in the Fortune 500 relies on Red Hat.
Find out why at Trusted | Red Hat.