Update the PR ref when the PR is updated
Sources: https://git-scm.com/docs/git-push
"""
By having the optional leading +, you can tell Git to update the
<dst> ref even if it is not allowed by default (e.g., it is not</dst>
a fast-forward.) This does not attempt to merge <src> into <dst>.</dst></src>
[...]
To force a push to only one branch, use a + in front of the refspec to push
"""
Fixes https://pagure.io/pagure/issue/2452
We are also adding unit-tests checking that the refs gets updated when
the PR is.
Finally, we had to adjust the unit-tests to prevent trying to push to
non-bare repos the refs of the PR.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>