[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-cvs] [60] Fix description of multiple hook post-receive handli
From: |
Bob Proulx |
Subject: |
[Savannah-cvs] [60] Fix description of multiple hook post-receive handling. |
Date: |
Sun, 12 Jan 2014 04:47:08 +0000 |
Revision: 60
http://svn.sv.gnu.org/viewvc/?view=rev&root=administration&revision=60
Author: rwp
Date: 2014-01-12 04:47:06 +0000 (Sun, 12 Jan 2014)
Log Message:
-----------
Fix description of multiple hook post-receive handling.
Modified Paths:
--------------
trunk/sviki/Git.mdwn
Modified: trunk/sviki/Git.mdwn
===================================================================
--- trunk/sviki/Git.mdwn 2014-01-12 04:46:55 UTC (rev 59)
+++ trunk/sviki/Git.mdwn 2014-01-12 04:47:06 UTC (rev 60)
@@ -52,39 +52,33 @@
Set git configurations:
- cd /srv/git/eliot.git/
- git config hooks.mailinglist address@hidden
+ cd /srv/git/auctex.git/
+ git config hooks.mailinglist address@hidden
Unprotect hooks/ directory:
chattr -i hooks/
cd hooks/
-Create post-receive hook:
+Link to post-receive-email script in hooks directory:
-post-receive file:
+ ln -s /usr/src/git/contrib/hooks/post-receive-email hooks/post-receive
- #!/bin/bash
- exec run-parts hooks/post-receive.d
-
-Make script executable:
-
- chmod a+x post-receive
-
-Create post-receive.d directory:
-
- mkdir post-receive.d#
- cd post-receive.d
-
-Link to post-receive-email script in post-receive.d directory:
-
- ln -s /usr/src/git/contrib/hooks/post-receive-email post-receive-email
-
Protect hooks/ direcotry again:
cd ../..
chattr +i hooks/
+If multiple post-receive hooks are desired then special handling is
+needed since oldrev newrev refname are passed in on stdin. This will
+need to be passed in to all hook scripts if multiple ones are desired.
+See auctex.git/hooks/post-receive for an example. Here is a snippet.
+
+ while read oldrev newrev refname; do
+ echo $oldrev $newrev $refname | /usr/local/bin/git-post-receive-hook
+ echo $oldrev $newrev $refname | hooks/post-receive-mail-local
+ done
+
Renaming a branch
-----------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Savannah-cvs] [60] Fix description of multiple hook post-receive handling.,
Bob Proulx <=