This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository maintenancescripts. from 1c7cc5d git/hooks/update-script._check{,+allow-merges}_: use common.sh. new 7c9a368 git/hooks/update-script._check_: make generic for denying and allowing merges via script name (symlink). new a855747 git/hooks/update-script._check_: use (...) instead of ...) for case-switches. new cf689b0 git/hooks: delete redundant update-script._check+allow-merges_ script. new c082a1a git/hooks: add update-script._check+allow-merges_ as symlink to update-script._check_. The 4 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/update-script._check+allow-merges_ | 50 +------------------------- git/hooks/update-script._check_ | 27 +++++++++----- 2 files changed, 19 insertions(+), 58 deletions(-) mode change 100755 => 120000 git/hooks/update-script._check+allow-merges_ -- 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 7c9a368bbcfbf826259b16225e351c083c6ba763 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 22:58:55 2015 +0100 git/hooks/update-script._check_: make generic for denying and allowing merges via script name (symlink). --- git/hooks/update-script._check_ | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/git/hooks/update-script._check_ b/git/hooks/update-script._check_ index 7da6fa7..da52255 100755 --- a/git/hooks/update-script._check_ +++ b/git/hooks/update-script._check_ @@ -2,6 +2,9 @@ . hooks/common.sh +MERGE="0" +[ "$(basename "${0}")" = "update-script_check+allow-merges_" ] && MERGE="1" + case "$1" in refs/tags/*) [ -f "$GIT_DIR/$1" ] && deny >/dev/null "You can't overwrite an existing tag" @@ -18,8 +21,14 @@ case "$1" in else case "${BRANCH}" in release/*|build-*|master) - # updating -- make sure it contains no merge commits - [ -n "$(git rev-list --merges $2..$3)" ] && deny > /dev/null "ERROR: update contains a merge." + # updating -- check for merge commit and deny or warn + [ -n "$(git rev-list --merges $2..$3)" ] && { + if [ "${MERGE}" = "0" ]; then + deny > /dev/null "ERROR: update contains a merge." + else + echowarn "WARNING: update contains a merge. Allowing merges by special policies for this project." + fi + } # updating -- make sure it is a fast forward mb=$(git merge-base "$2" "$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 a8557479c833bc81118b0da303d93f31499d4798 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 22:59:47 2015 +0100 git/hooks/update-script._check_: use (...) instead of ...) for case-switches. --- git/hooks/update-script._check_ | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/git/hooks/update-script._check_ b/git/hooks/update-script._check_ index da52255..e8e5898 100755 --- a/git/hooks/update-script._check_ +++ b/git/hooks/update-script._check_ @@ -6,21 +6,21 @@ MERGE="0" [ "$(basename "${0}")" = "update-script_check+allow-merges_" ] && MERGE="1" case "$1" in - refs/tags/*) + (refs/tags/*) [ -f "$GIT_DIR/$1" ] && deny >/dev/null "You can't overwrite an existing tag" ;; - refs/heads/*) + (refs/heads/*) BRANCH="${1#refs/heads/}" # No rebasing or rewinding on release, build or master branches. if expr "$2" : '0*$' >/dev/null; then case "${BRANCH}" in - release/*|build-*|master|feature/*|bugfix/*) info "The branch '$1' is new..." ;; - *) deny >/dev/null "ERROR: Branch name does not meet the project policies. Please contact git-admin@x2go.org." ;; + (release/*|build-*|master|feature/*|bugfix/*) info "The branch '$1' is new..." ;; + (*) deny >/dev/null "ERROR: Branch name does not meet the project policies. Please contact git-admin@x2go.org." ;; esac else case "${BRANCH}" in - release/*|build-*|master) + (release/*|build-*|master) # updating -- check for merge commit and deny or warn [ -n "$(git rev-list --merges $2..$3)" ] && { if [ "${MERGE}" = "0" ]; then @@ -37,8 +37,8 @@ case "$1" in *) deny > /dev/null "ERROR: This is not a fast-forward update. History has been rewritten." ;; esac ;; - feature/*|bugfix/*) info "Not checking for non-fast-forwards or merges on ${BRANCH}." ;; - *) deny >/dev/null "ERROR: Branch name does not meet the project policies. Please contact git-admin@x2go.org." ;; + (feature/*|bugfix/*) info "Not checking for non-fast-forwards or merges on ${BRANCH}." ;; + (*) deny >/dev/null "ERROR: Branch name does not meet the project policies. Please contact git-admin@x2go.org." ;; esac fi for REVISION in $(git rev-list --reverse "$2..$3") ; do -- 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 cf689b0fb539f960a17fbab4b6e795418cc95523 Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 23:07:10 2015 +0100 git/hooks: delete redundant update-script._check+allow-merges_ script. --- git/hooks/update-script._check+allow-merges_ | 49 -------------------------- 1 file changed, 49 deletions(-) diff --git a/git/hooks/update-script._check+allow-merges_ b/git/hooks/update-script._check+allow-merges_ deleted file mode 100755 index bb906c9..0000000 --- a/git/hooks/update-script._check+allow-merges_ +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -. hooks/common.sh - -case "$1" in - refs/tags/*) - [ -f "$GIT_DIR/$1" ] && deny >/dev/null "You can't overwrite an existing tag" - ;; - refs/heads/*) - BRANCH="${1#refs/heads/}" - - # No rebasing or rewinding on release, build or master branches. - if expr "$2" : '0*$' >/dev/null; then - case "${BRANCH}" in - release/*|build-*|master|feature/*|bugfix/*) info "The branch '$1' is new..." ;; - *) deny >/dev/null "ERROR: Branch name does not meet the project policies. Please contact git-admin@x2go.org." ;; - esac - else - case "${BRANCH}" in - release/*|build-*|master) - # updating -- make sure it contains no merge commits - [ -n "$(git rev-list --merges $2..$3)" ] && echowarn "WARNING: update contains a merge. Allowing merges by special policies for this project." - - # 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 - ;; - feature/*|bugfix/*) info "Not checking for non-fast-forwards or merges on ${BRANCH}." ;; - *) deny >/dev/null "ERROR: Branch name does not meet the project policies. Please contact git-admin@x2go.org." ;; - 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
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository maintenancescripts. commit c082a1a6cf99b6a20befe5f23a6f2df853cbb10d Author: Mihai Moldovan <ionic@ionic.de> Date: Mon Feb 23 23:07:45 2015 +0100 git/hooks: add update-script._check+allow-merges_ as symlink to update-script._check_. --- git/hooks/update-script._check+allow-merges_ | 1 + 1 file changed, 1 insertion(+) diff --git a/git/hooks/update-script._check+allow-merges_ b/git/hooks/update-script._check+allow-merges_ new file mode 120000 index 0000000..fae694f --- /dev/null +++ b/git/hooks/update-script._check+allow-merges_ @@ -0,0 +1 @@ +update-script._check_ \ No newline at end of file -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git