[sysadmin-bin] Keep monitored the master branch, don't notify for other branches commits.



commit f64ba36d573567b8cee1c423a92b2278d3bb77a2
Author: Andrea Veri <av gnome org>
Date:   Wed Jun 26 12:21:42 2013 +0200

    Keep monitored the master branch, don't notify for other branches commits.

 git/log-push                |   46 -------------------------------------------
 git/post-receive-notify-kgb |    2 +-
 2 files changed, 1 insertions(+), 47 deletions(-)
---
diff --git a/git/log-push b/git/log-push
index 5a539bb..e69de29 100755
--- a/git/log-push
+++ b/git/log-push
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-# Log who pushed a ref to a repository and when. The input is expected to be the
-# same as for a git post-receive hook - a series of one line for each pushed ref
-#
-#  old_revision_hash new_revision_hash refname
-
-# Set GIT_DIR either from the working directory, or from the environment variable.
-GIT_DIR=$(git rev-parse --git-dir 2>/dev/null)
-if [ -z "$GIT_DIR" ]; then
-     echo >&2 "fatal: post-receive: GIT_DIR not set"
-     exit 1
-fi
-
-LOG_FILE="$GIT_DIR/gnome_pushlog"
-
-user=$(whoami)
-# RFC 822 date with a fixed UTC timezone (Thu, 05 Feb 2009 19:25:44 +0000)
-date=$(TZ=UTC date -R)
-
-# We use a log file since the '>>' append is not guaranteed to be atomic, though
-# it almost certainly is in practice.
-LOCK_FILE=$LOG_FILE.lock
-
-count=0
-while ! ln -s $$ $LOCK_FILE > /dev/null 2>&1 ; do
-    if [ $count = 0 ] ; then
-       echo "Waiting for lock file '$LOCK_FILE'" 1>&2
-    fi
-    if [ $count = 30 ] ; then
-       echo "Timed out" 1>&2
-       exit 1
-    fi
-    sleep 1
-    count=$((count+1))
-done
-
-# successfuly created lock file
-trap "rm -f $LOCK_FILE; exit" INT TERM EXIT
-
-umask 0002
-
-while read oldrev newrev refname
-do
-       echo "$oldrev   $newrev $refname        $user   $date" >> $LOG_FILE
-done
diff --git a/git/post-receive-notify-kgb b/git/post-receive-notify-kgb
index fbb05c9..9c084be 100755
--- a/git/post-receive-notify-kgb
+++ b/git/post-receive-notify-kgb
@@ -5,4 +5,4 @@
 REPOSITORY_ID=$(basename "$PWD")
 REPOSITORY_ID=${REPOSITORY_ID%.git}
 
-tee hooks/reflog | kgb-client --conf /home/admin/KGB/kgb-client-$REPOSITORY_ID.conf --repository git 
--git-reflog - > /dev/null 2>&1
+grep -v refs/heads/master | kgb-client --conf /home/admin/KGB/kgb-client-$REPOSITORY_ID.conf --repository 
git --git-reflog - > /dev/null 2>&1


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