@anarcat Any ideas how to implement this modification in the post-receive hook?
I think we could do it by reusing the previous tmpfile pattern, but using a >> $tmpfile instead of > $tmpfile; that should fix the issue when pushing mulitple refs.
tmpfile=$(mktemp) trap 'rm -f $tmpfile' EXIT while read -r oldrev newrev refname; do echo "$oldrev $newrev $refname" >> "$tmpfile"done
(i forgot to post this comment, which is now irrelevant, but i'll still post it for histical purposes)
@anarcat Any ideas how to implement this modification in the post-receive hook?
i think the simplest way to do this is configure git-multimail properly. the code has lots of knobs, and one of them is a way to include or exclude refs. so I did this:
(i forgot to post this comment, which is now irrelevant, but i'll still post it for histical purposes)
it turns out this only dealt with email notifications and what @lavamind wanted also included IRC notifications.
so i had to rewire the post-receive hook quite a bit.
then @lavamind also wanted to force-push to topic branches so i had to rewire the pre-receive hook then.
next thing I know i was down in a rabbit hole, holding a keyboard full of rabbit blood and yak shavings, and i had refactored the hook system to look alarmingly like what we had on cupani with the gitolite system, and i was screaming for mercy.
but anyways.
now we have hooks in pre-receive.d and post-receive.d and they're ran on push. hooks in pre-receive.d are special in that non-zero exits stop processing.