diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2019-02-22 17:05:07 +0200 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2019-03-05 14:26:09 -0500 |
commit | 7f0516022bb84378df13136273b42019e54157f9 (patch) | |
tree | dab6e50ad59dbfbead59785d4b9d1dab67a79e2e /scripts/maint | |
parent | 0deea98d021d105eeb5dc5c43c144847ad188ea5 (diff) | |
download | tor-7f0516022bb84378df13136273b42019e54157f9.tar.gz tor-7f0516022bb84378df13136273b42019e54157f9.zip |
Also disallow pushing to/from upstream branch when branch names do not match
Diffstat (limited to 'scripts/maint')
-rwxr-xr-x | scripts/maint/pre-push.git-hook | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/maint/pre-push.git-hook b/scripts/maint/pre-push.git-hook index 24043978b6..e7a72efa08 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 |