$(prefix)/share/git-core/contrib/hooks/post-receive-email, , ( ) . git for-each-ref , , - , , :
if [ "$change_type" = create ]
then
revspec=$newrev
else
revspec=$oldrev..$newrev
fi
other_branches=$(git for-each-ref --format='%(refname)' refs/heads/ |
grep -F -v $refname)
git rev-parse --not $other_branches | git rev-list --pretty --stdin $revspec
( , . : $change_type is create, $oldrev - , update; $oldrev - rev SHA1 , stdin; $newrev - rev SHA1, $refname - , refs/heads/topic.)