This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository maintenancescripts. from f5b2c9f git/hooks/x2go-post-receive-tag-pending: add myself to copyright header. new 477359b git/hooks: fix function definition syntax. new 43c2b37 git/hooks/common.sh: add new 1c7cc5d git/hooks/update-script._check{,+allow-merges}_: use common.sh. The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: git/hooks/common.sh | 81 ++++++++++++++++++++++- git/hooks/update-script._check+allow-merges_ | 92 +------------------------- git/hooks/update-script._check_ | 90 +------------------------ git/hooks/x2go-post-receive-close-bugs | 2 +- git/hooks/x2go-post-receive-tag-pending | 2 +- 5 files changed, 82 insertions(+), 185 deletions(-) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit 477359b509c411cbbc16655b34b6c5ac53f60099 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 22:16:40 2015 +0100 git/hooks: fix function definition syntax. --- git/hooks/common.sh | 7 ++++--- git/hooks/x2go-post-receive-close-bugs | 2 +- git/hooks/x2go-post-receive-tag-pending | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/git/hooks/common.sh b/git/hooks/common.sh index e5b2f21..6c6100f 100755 --- a/git/hooks/common.sh +++ b/git/hooks/common.sh @@ -13,7 +13,7 @@ fi # GIT_DIR will always be the current repository's .git dir. GIT_DIR="$(pwd)" -function make_boolean() { +function make_boolean () { OPTION="${1}" case "${OPTION}" in @@ -34,13 +34,14 @@ verbose="1" # Default shell globbing messes things up downstream. GLOBIGNORE=* -function grant() { +# Only stderr is passed on to the client. +function grant () { [ "$(make_boolean "${verbose}")" = "1" ] && echo "-Grant- ${1}" >&2 echo grant exit 0 } -function info() { +function info () { [ "$(make_boolean "${verbose}")" = "1" ] && echo "-Info- ${1}" >&2 } diff --git a/git/hooks/x2go-post-receive-close-bugs b/git/hooks/x2go-post-receive-close-bugs index a0d80cb..39c2c6b 100755 --- a/git/hooks/x2go-post-receive-close-bugs +++ b/git/hooks/x2go-post-receive-close-bugs @@ -29,7 +29,7 @@ PROJECT="${GIT_REPO_NAME//.git/}" tempdir="$(mktemp -d)" trap "rm -rf \"${tempdir}\"" EXIT -function send_mail() { # send_mail bugno revno diff_file +function send_mail () { # send_mail bugno revno diff_file local bug="${1}" local fixed_in_version="${2}" local oldrev="${3}" diff --git a/git/hooks/x2go-post-receive-tag-pending b/git/hooks/x2go-post-receive-tag-pending index 3bcc3c0..bf4bdcb 100755 --- a/git/hooks/x2go-post-receive-tag-pending +++ b/git/hooks/x2go-post-receive-tag-pending @@ -29,7 +29,7 @@ PROJECT="${GIT_REPO_NAME//.git/}" tempdir="$(mktemp -d)" trap "rm -rf \"${tempdir}\"" EXIT -function send_mail() { # send_mail bugno revno diff_file +function send_mail () { # send_mail bugno revno diff_file local bug="${1}" local fixed_in_version="${2}" local rev="${3}" -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit 43c2b37eee3102faf895dabc769fd276aa2e36bc Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 22:17:09 2015 +0100 git/hooks/common.sh: add - deny() - echoerr() - echowarn() - is_text_file() - check_log_message() - check_trailing_whitespace() - check_ending_newline() - check_tabs() - check_dos_linebreaks() functions. --- git/hooks/common.sh | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/git/hooks/common.sh b/git/hooks/common.sh index 6c6100f..c350386 100755 --- a/git/hooks/common.sh +++ b/git/hooks/common.sh @@ -45,3 +45,77 @@ function info () { [ "$(make_boolean "${verbose}")" = "1" ] && echo "-Info- ${1}" >&2 } +function deny () { + [ "$(make_boolean "${verbose}")" = "1" ] && echo "-Deny- ${1}" >&2 + echo deny + exit 1 +} + +function echoerr () { + echo "-Deny- ${@}" >&2 +} + +function echowarn () { + echo "-Warn- ${@}" >&2 +} + +function 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. +function check_log_message () { + if ! git log -1 --pretty="format:%B" "${REVISION}" | grep -q "[a-zA-Z0-9]"; then + echoerr "In ${REVISION}:" + echoerr "Your log message is empty." + echoerr "Commit aborted, fix the issue and try again." + exit 1 + fi +} + +function check_trailing_whitespace () { + git diff-tree --diff-filter="A|C|M|R" --name-only -r "${REVISION}" | tail -n +2 | egrep -v '/$|\.diff$|\.patch$' | egrep "${@}" | while read file; 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 +} + +function check_ending_newline () { + git diff-tree --diff-filter="A|C|M|R" --name-only -r "${REVISION}" | tail -n +2 | egrep -v '/$|\.diff$|\.patch$' | egrep "${@}" | while read file; 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 +} + +function check_tabs () { + 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 "${@}" | while read file; 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 +} + +function check_dos_linebreaks () { + git diff-tree --diff-filter="A|C|M|R" --name-only -r "${REVISION}" | tail -n +2 | egrep "${@}" | while read file; 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 + echowarn "In ${REVISION}:" + echowarn "DOS linebreaks found in ${file}." + fi + fi + done +} -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit 1c7cc5dccbd08a0177de12df92b24ef1fc79ecfc Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 22:19:52 2015 +0100 git/hooks/update-script._check{,+allow-merges}_: use common.sh. --- git/hooks/update-script._check+allow-merges_ | 92 +------------------------- git/hooks/update-script._check_ | 90 +------------------------ 2 files changed, 2 insertions(+), 180 deletions(-) diff --git a/git/hooks/update-script._check+allow-merges_ b/git/hooks/update-script._check+allow-merges_ index 3be967e..bb906c9 100755 --- a/git/hooks/update-script._check+allow-merges_ +++ b/git/hooks/update-script._check+allow-merges_ @@ -1,96 +1,6 @@ #!/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 () { - git diff-tree --diff-filter="A|C|M|R" --name-only -r $REVISION | tail -n +2 | egrep -v '/$|\.diff$|\.patch$' | egrep "$@" | while read file; 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 () { - git diff-tree --diff-filter="A|C|M|R" --name-only -r $REVISION | tail -n +2 | egrep -v '/$|\.diff$|\.patch$' | egrep "$@" | while read file; 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 () { - 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 "$@" | while read file; 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 () { - git diff-tree --diff-filter="A|C|M|R" --name-only -r $REVISION | tail -n +2 | egrep "$@" | while read file; 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 -} - +. hooks/common.sh case "$1" in refs/tags/*) diff --git a/git/hooks/update-script._check_ b/git/hooks/update-script._check_ index c8fd284..7da6fa7 100755 --- a/git/hooks/update-script._check_ +++ b/git/hooks/update-script._check_ @@ -1,94 +1,6 @@ #!/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 () { - git diff-tree --diff-filter="A|C|M|R" --name-only -r $REVISION | tail -n +2 | egrep -v '/$|\.diff$|\.patch$' | egrep "$@" | while read file; 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 () { - git diff-tree --diff-filter="A|C|M|R" --name-only -r $REVISION | tail -n +2 | egrep -v '/$|\.diff$|\.patch$' | egrep "$@" | while read file; 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 () { - 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 "$@" | while read file; 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 () { - git diff-tree --diff-filter="A|C|M|R" --name-only -r $REVISION | tail -n +2 | egrep "$@" | while read file; 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 - echowarn "In $REVISION:" - echowarn "DOS linebreaks found in $file." - fi - fi - done -} - +. hooks/common.sh case "$1" in refs/tags/*) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git