X-Git-Url: https://git.madduck.net/code/fbi-announce.git/blobdiff_plain/82224fa7745618fa73bc0d5ca044cba654285922..c853b83790da6402b7a6f4b954b9503c23dfef7e:/post-receive-hook.sh diff --git a/post-receive-hook.sh b/post-receive-hook.sh index 04198d3..c107292 100755 --- a/post-receive-hook.sh +++ b/post-receive-hook.sh @@ -6,6 +6,9 @@ # # 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}) @@ -13,8 +16,9 @@ siblingscript="${realself%/*}/fbi-announce.sh" 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 }