[sysadmin-bin] Make sure gimp-* branches are protected



commit 94cb36ba1e0136fadfb650794b680578a856ac52
Author: Andrea Veri <averi redhat com>
Date:   Wed May 23 09:42:03 2018 +0200

    Make sure gimp-* branches are protected

 git/pre-receive-check-policy | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/git/pre-receive-check-policy b/git/pre-receive-check-policy
index 584b415..8ce2e47 100755
--- a/git/pre-receive-check-policy
+++ b/git/pre-receive-check-policy
@@ -113,12 +113,12 @@ check_ref_update() {
            branchname=${refname#refs/heads/}
 
             is_wip=false
-            is_master=false
-            is_gnome=false
+            is_protected=false
             case $branchname in
                 wip/*) is_wip=true ;;
-                master) is_master=true ;;
-                gnome-*) is_gnome=true ;;
+                master) is_protected=true ;;
+                gnome-*) is_protected=true ;;
+                gimp-*) is_protected=true ;;
             esac
 
            range=
@@ -162,7 +162,7 @@ check_ref_update() {
                                 nonfastforward=true
                             fi
                         elif [ "`hostname`" == 'gitlab.gnome.org' ]; then
-                            if [[ "$is_master" = true || "$is_gnome" = true ]]; then
+                            if [[ "$is_protected" = true ]]; then
                                 nonfastforward=true
                             fi
                         fi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]