If the PagureForceCommitHook is active on a project and one tries to push new branch, the following error is printed by git push and the push is refused:
PagureForceCommitHook
git push
remote: ERROR: ['git', 'rev-list', '0000000000000000000000000000000000000000', '^0e6e0b6c931d65ee22f67205a53933d841c6eeff'] =-- 128 remote: remote: fatal: bad object 0000000000000000000000000000000000000000
This patch makes sure this doesn't happen by checking if theoldrev in is_forced_push is all zeroes.
oldrev
is_forced_push
Ok, thanks :)
Pull-Request has been merged by pingou
If the
PagureForceCommitHookis active on a project and one tries to push new branch, the following error is printed bygit pushand the push is refused:This patch makes sure this doesn't happen by checking if the
oldrevinis_forced_pushis all zeroes.