[X2Go-Commits] [maintenancescripts] 03/04: git/hooks: remove obsolete/duplicated scripts update-script._tag-latest_ and post-receive._code.x2go.org_.
git-admin at x2go.org
git-admin at x2go.org
Sun Feb 22 01:18:38 CET 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository maintenancescripts.
commit 5e88b19a763b0109fdedc09f002cbc6527501653
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sun Feb 22 01:15:11 2015 +0100
git/hooks: remove obsolete/duplicated scripts update-script._tag-latest_ and post-receive._code.x2go.org_.
---
git/hooks/post-receive._code.x2go.org_ | 21 ------
git/hooks/update-script._tag-latest_ | 127 --------------------------------
2 files changed, 148 deletions(-)
diff --git a/git/hooks/post-receive._code.x2go.org_ b/git/hooks/post-receive._code.x2go.org_
deleted file mode 100755
index 673abcd..0000000
--- a/git/hooks/post-receive._code.x2go.org_
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#
-# Hook script for the "post-receive" event.
-#
-# The "post-receive" script is run after receive-pack has accepted a pack
-# and the repository has been updated. It is passed arguments in through
-# stdin in the form
-# <oldrev> <newrev> <refname>
-# For example:
-# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
-#
-# see contrib/hooks/ for a sample, or uncomment the next line and
-# rename the file to "post-receive".
-
-GIT_REPO_URL=git://code.x2go.org/`pwd | sed 's:.*\/::'`
-curl http://jenkins.x2go.org:8080/git/notifyCommit?url=$GIT_REPO_URL
-
-exec /usr/bin/pee \
- "/srv/git/_hooks_/x2go-post-receive-tag-pending" \
- "/srv/git/_hooks_/x2go-post-receive-close-bugs" \
- "/srv/git/_hooks_/post-receive-email"
diff --git a/git/hooks/update-script._tag-latest_ b/git/hooks/update-script._tag-latest_
deleted file mode 100755
index 1098693..0000000
--- a/git/hooks/update-script._tag-latest_
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/bin/bash
-
-umask 002
-
-verbose=true
-
-# Default shell globbing messes things up downstream
-GLOBIGNORE=*
-
-function info {
- $verbose && echo >&2 "-Info- $1"
-}
-
-function deny {
- $verbose && echo >&2 "-Deny- $1"
- echo deny
- exit 1
-}
-
-# Only stderr is passed on to the client.
-echoerr () {
- echo "-Deny- $@" >&2
-}
-
-# Only stderr is passed on to the client.
-echowarn () {
- echo "-Warn- $@" >&2
-}
-
-is_text_file () {
- rev=$1
- file=$2
- info
- [ -z "$(git show --stat --pretty="format:" $rev -- "$file" | grep "$file *| Bin.*bytes$")" ]
-}
-
-# Make sure that the log message contains some text.
-check_log_message () {
- if ! git log -1 --pretty="format:%B" $REVISION | grep "[a-zA-Z0-9]" > /dev/null ; then
- echoerr "In $REVISION:"
- echoerr "Your log message is empty."
- echoerr "Commit aborted, fix the issue and try again."
- exit 1
- fi
-}
-
-check_trailing_whitespace () {
- for file in $(git diff-tree --diff-filter="A|C|M|R" --name-only -r $REVISION | tail -n +2 | egrep -v '/$|\.diff$|\.patch$' | egrep "$@") ; do
- if is_text_file $REVISION "$file" 2> /dev/null ; then
- if git cat-file -p "$REVISION:$file" | grep -e '[ ]$' > /dev/null ; then
- echowarn "In $REVISION:"
- echowarn "Trailing whitespace found in $file."
- fi
- fi
- done
-}
-
-check_ending_newline () {
- for file in $(git diff-tree --diff-filter="A|C|M|R" --name-only -r $REVISION | tail -n +2 | egrep -v '/$|\.diff$|\.patch$' | egrep "$@") ; do
- if is_text_file $REVISION "$file" 2> /dev/null ; then
- if [ `git cat-file -p "$REVISION:$file" | tail -c1 | wc -l` = 0 ]; then
- echowarn "In $REVISION:"
- echowarn "$file does not end in a newline."
- fi
- fi
- done
-}
-
-
-check_tabs () {
- for file in $(git diff-tree --diff-filter="A|C|M|R" --name-only -r $REVISION | tail -n +2 | egrep -v 'Makefile.*|common.mak|subdir.mak|clean-diff|\.diff|\.patch' | egrep "$@") ; do
- if is_text_file $REVISION "$file" 2> /dev/null ; then
- if git cat-file -p "$REVISION:$file" | grep -P '\t' > /dev/null; then
- echowarn "In $REVISION:"
- echowarn "Tabs found in $file."
- fi
- fi
- done
-}
-
-check_dos_linebreaks () {
- for file in $(git diff-tree --diff-filter="A|C|M|R" --name-only -r $REVISION | tail -n +2 | egrep "$@") ; do
- if is_text_file $REVISION "$file" 2> /dev/null ; then
- if git cat-file -p "$REVISION:$file" | grep -q '^M$' 2> /dev/null; then
- echoerr "In $REVISION:"
- echoerr "DOS linebreaks found in $file."
- echoerr "Commit aborted, fix the issue and try again."
- exit 1
- fi
- fi
- done
-}
-
-
-case "$1" in
- refs/tags/*)
- [ -f "$GIT_DIR/$1" ] && deny >/dev/null "You can't overwrite an existing tag"
- ;;
- refs/heads/*)
- # No rebasing or rewinding
- if expr "$2" : '0*$' >/dev/null; then
- info "The branch '$1' is new..."
- else
- # updating -- make sure it contains no merge commits
- [ -n "$(git rev-list --merges $2..$3)" ] && deny > /dev/null "ERROR: update contains a merge."
- # updating -- make sure it is a fast forward
- mb=$(git merge-base "$2" "$3")
- case "$mb,$2" in
- "$2,$mb") info "Update is fast-forward" ;;
- *) deny > /dev/null "ERROR: This is not a fast-forward update. History has been rewritten." ;;
- esac
- fi
- for REVISION in $(git rev-list --reverse "$2..$3") ; do
- # Make sure that the log message contains some text.
- check_log_message
-
- # Enforce some style guidelines on commits: Trailing whitespace, tabs (outside
- # of Makefiles) and DOS line endings are forbidden, all files must end in
- # newlines.
- check_trailing_whitespace ""
- check_tabs ""
- check_dos_linebreaks ""
- check_ending_newline ""
- done
- ;;
-esac
-
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
More information about the x2go-commits
mailing list