#!/bin/sh # # post-receive-hook — a post-receive hook to invoke fbi-announce # # Copyright © 2009–2010 martin f. krafft # # Distributed under the terms of the Artistic Licence 2.0 # set -eu refname=$3 rev=$(git rev-parse ${refname}) oldhead=$1 newhead=$2 realself=$(readlink -f ${0}) siblingscript="${realself%/*}/fbi-announce.sh" for commit in $(git rev-parse --not --branches | grep -v ${rev} | git rev-list --reverse --stdin ${oldhead}..${newhead}); do ${siblingscript} ${refname} ${commit} done