[tor-commits] [tor/master] Also disallow pushing to/from upstream branch when branch names do not match
dgoulet at torproject.org
dgoulet at torproject.org
Tue Mar 5 19:30:57 UTC 2019
commit 7f0516022bb84378df13136273b42019e54157f9
Author: rl1987 <rl1987 at 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
More information about the tor-commits
mailing list