]> git.droids-corp.org - git-central.git/commitdiff
Move post-receive-email settings to a subsection.
authorStephen Haberman <stephen@exigencecorp.com>
Thu, 14 Aug 2008 17:48:36 +0000 (12:48 -0500)
committerStephen Haberman <stephen@exigencecorp.com>
Thu, 14 Aug 2008 17:48:36 +0000 (12:48 -0500)
server/post-receive-email
tests/t2200-1.txt
tests/t2200-server-post-receive-email.sh
tests/t2201-1.txt
tests/t2201-2.txt
tests/t2201-3.txt
tests/t2201-server-post-receive-email-tags.sh
tests/t2202-1.txt
tests/t2202-2.txt
tests/t2202-server-post-receive-email-branches.sh

index c132868c128ef1bb583fb577f70f6211f38c617b..0f5ef617d64fe7dc6b36c168c866a990f058cfb6 100755 (executable)
 #
 # Config
 # ------
-# hooks.mailinglist
+# hooks.post-receive-email.mailinglist
 #   This is the list that all pushes will go to; leave it blank to not send
 #   emails for every ref update.
-# hooks.announcelist
+# hooks.post-receive-email.announcelist
 #   This is the list that all pushes of annotated tags will go to.  Leave it
 #   blank to default to the mailinglist field.  The announce emails lists
 #   the short log summary of the changes since the last annotated tag.
-# hooks.envelopesender
+# hooks.post-receive-email.envelopesender
 #   If set then the -f option is passed to sendmail to allow the envelope
 #   sender address to be set
 #
@@ -141,10 +141,10 @@ generate_email()
        if [ -z "$recipients" ]; then
                case "$refname_type" in
                        "annotated tag")
-                               config_name="hooks.announcelist"
+                               config_name="hooks.post-receive-email.announcelist"
                                ;;
                        *)
-                               config_name="hooks.mailinglist"
+                               config_name="hooks.post-receive-email.mailinglist"
                                ;;
                esac
                echo >&2 "*** $config_name is not set so no email will be sent"
@@ -621,11 +621,11 @@ then
        projectdesc="UNNAMED PROJECT"
 fi
 
-recipients=$(git config hooks.mailinglist)
-announcerecipients=$(git config hooks.announcelist)
-envelopesender=$(git config hooks.envelopesender)
+recipients=$(git config hooks.post-receive-email.mailinglist)
+announcerecipients=$(git config hooks.post-receive-email.announcelist)
+envelopesender=$(git config hooks.post-receive-email.envelopesender)
 emailprefix="[$projectdesc]"
-debug=$(git config hooks.debug)
+debug=$(git config hooks.post-receive-email.debug)
 
 # --- Main loop
 # Allow dual mode: run from the command line just like the update hook, or
index 1bcbb9aac4238298510db49fedb1175d6036342e..c462cfe6770029946f6e4df358a92469cc0fde08 100644 (file)
@@ -1,3 +1,4 @@
+From: author@payflex.com
 To: commits@list.com
 Subject: [cbas] master branch updated. $new_commit_hash
 X-Git-Refname: refs/heads/master
index 2ac0dcb637c95269ba7c0bfda23878f728f85c1d..3cda758fe80a89fd56e6f8a06e71817c6da78d8d 100644 (file)
@@ -4,6 +4,8 @@ test_description='server post-receive email notification'
 
 . ./test-lib.sh
 
+export USER=author
+
 test_expect_success 'setup' '
        echo "setup" >a &&
        git add a &&
@@ -13,8 +15,8 @@ test_expect_success 'setup' '
        git remote add origin ./server &&
        git config --add branch.master.remote origin &&
        git config --add branch.master.merge refs/heads/master &&
-       GIT_DIR=./server/.git git config --add hooks.mailinglist commits@list.com &&
-       GIT_DIR=./server/.git git config --add hooks.debug true &&
+       GIT_DIR=./server/.git git config --add hooks.post-receive-email.mailinglist commits@list.com &&
+       GIT_DIR=./server/.git git config --add hooks.post-receive-email.debug true &&
        GIT_DIR=.
        echo cbas >./server/.git/description
 '
index 187053f6e963b1c04d83fdcd8cb2d3e9676abe17..633c311afc43e1e761fb589ee3611c7ef7a1a09d 100644 (file)
@@ -1,3 +1,4 @@
+From: author@payflex.com
 To: commits@list.com
 Subject: [cbas] 1.0 annotated tag created. 1.0
 X-Git-Refname: refs/tags/1.0
index 70d21829f6abdb582525b20fff686685a3c90f4e..30577a35a4e39449026194625da5db5ffd9f2865 100644 (file)
@@ -1,3 +1,4 @@
+From: author@payflex.com
 To: commits@list.com
 Subject: [cbas] master branch updated. 1.0-2-g$new_commit_abbrev
 X-Git-Refname: refs/heads/master
index bb10a0c1b67e60719364bf6a95394281f1a505d8..cf693cbd6110658b3c3e9066b4075985d44434e2 100644 (file)
@@ -1,3 +1,4 @@
+From: author@payflex.com
 To: commits@list.com
 Subject: [cbas] 2.0 annotated tag created. 2.0
 X-Git-Refname: refs/tags/2.0
index 4e0e0f3597c1dc1665df569e3781e81644ca1c75..c7622aeb32947ed36cb1fd3c009b3027c49dff55 100644 (file)
@@ -4,6 +4,8 @@ test_description='server post-receive email notification'
 
 . ./test-lib.sh
 
+export USER=author
+
 test_expect_success 'setup' '
        echo "setup" >a &&
        git add a &&
@@ -13,8 +15,8 @@ test_expect_success 'setup' '
        git remote add origin ./server &&
        git config --add branch.master.remote origin &&
        git config --add branch.master.merge refs/heads/master &&
-       GIT_DIR=./server/.git git config --add hooks.mailinglist commits@list.com &&
-       GIT_DIR=./server/.git git config --add hooks.debug true &&
+       GIT_DIR=./server/.git git config --add hooks.post-receive-email.mailinglist commits@list.com &&
+       GIT_DIR=./server/.git git config --add hooks.post-receive-email.debug true &&
        GIT_DIR=.
        echo cbas >./server/.git/description
 '
index bc5bb5132976e38fbb1e0d761869c6c7d957ab69..9c9d31a8391ce980b14b2e958ec42410169acdee 100644 (file)
@@ -1,3 +1,4 @@
+From: author@payflex.com
 To: commits@list.com
 Subject: [cbas] topic branch created. $new_commit_hash
 X-Git-Refname: refs/heads/topic
index 2227e4de1dcfbcfbba7fe708e0582d13a66bc204..6ad64643855f4851ccf11d8779ed59c2ca1c9fca 100644 (file)
@@ -1,3 +1,4 @@
+From: author@payflex.com
 To: commits@list.com
 Subject: [cbas] topic branch deleted. $old_commit_hash
 X-Git-Refname: refs/heads/topic
index 0b35c612d6af27c0278539c88e7b62345c3da70d..b6b8f16635d7fc48c67d07581d381ccb52b61166 100644 (file)
@@ -4,6 +4,8 @@ test_description='server post-receive email notification'
 
 . ./test-lib.sh
 
+export USER=author
+
 test_expect_success 'setup' '
        echo "setup" >a &&
        git add a &&
@@ -13,8 +15,8 @@ test_expect_success 'setup' '
        git remote add origin ./server &&
        git config --add branch.master.remote origin &&
        git config --add branch.master.merge refs/heads/master &&
-       GIT_DIR=./server/.git git config --add hooks.mailinglist commits@list.com &&
-       GIT_DIR=./server/.git git config --add hooks.debug true &&
+       GIT_DIR=./server/.git git config --add hooks.post-receive-email.mailinglist commits@list.com &&
+       GIT_DIR=./server/.git git config --add hooks.post-receive-email.debug true &&
        GIT_DIR=.
        echo cbas >./server/.git/description
 '