]> git.madduck.net Git - code/fbi-announce.git/blobdiff - post-receive-hook.sh

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add ability to specify cc recipients
[code/fbi-announce.git] / post-receive-hook.sh
index 04198d3679e24f62c03edcd2508976583ecb4d4e..c107292b9fd43de0c10dd4aa688bafed112ada11 100755 (executable)
@@ -6,6 +6,9 @@
 #
 # Distributed under the terms of the Artistic Licence 2.0
 #
 #
 # Distributed under the terms of the Artistic Licence 2.0
 #
+#
+# Link this to $GIT_DIR/hooks/post-receive (or …/update).
+#
 set -eu
 
 realself=$(readlink -f ${0})
 set -eu
 
 realself=$(readlink -f ${0})
@@ -13,8 +16,9 @@ siblingscript="${realself%/*}/fbi-announce.sh"
 
 process_update()
 {
 
 process_update()
 {
-  for commit in $(git rev-parse --not --branches | grep -v ${rev} |
-                  git rev-list --reverse --stdin ${1}..${2}); do
+  for commit in $(git rev-parse --not --branches |
+                    grep -v $(git rev-parse ${3}) |
+                    git rev-list --reverse --stdin ${1}..${2}); do
     ${siblingscript} ${3} ${commit}
   done
 }
     ${siblingscript} ${3} ${commit}
   done
 }