commit 7f0516022bb84378df13136273b42019e54157f9 Author: rl1987 rl1987@sdf.lonestar.org Date: Fri Feb 22 17:05:07 2019 +0200
Also disallow pushing to/from upstream branch when branch names do not match --- scripts/maint/pre-push.git-hook | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/maint/pre-push.git-hook b/scripts/maint/pre-push.git-hook index 24043978b..e7a72efa0 100755 --- a/scripts/maint/pre-push.git-hook +++ b/scripts/maint/pre-push.git-hook @@ -44,8 +44,9 @@ do range="$remote_sha..$local_sha" fi
- if ref_is_upstream_branch "$local_ref" == 0 || - ref_is_upstream_branch "$remote_ref" == 0 + if (ref_is_upstream_branch "$local_ref" == 0 || + ref_is_upstream_branch "$remote_ref" == 0) && + [ "$local_ref" != "$remote_ref" ] then if [ "$remote" == "origin" ] then
tor-commits@lists.torproject.org