Ran into a gotcha in Git today when trying to write a post push hook. We want our designer to have a fast turn around time with clients so we're writing some hooks to merge all of the 'theme' branches he works with to get merged into a special preview branch which is then deployed to the preview site. And all this should happen after he does a 'git push.' Seems like a 'post-receive' hook is just what we want.
error: git-shell died of signal 13
fatal: The remote end hung up unexpectedly
error: error in sideband demultiplexer
STDIN.readlines.each do |line|
rev_old, rev_new, ref = line.split(" ")
# You will get in here as many times as branches were pushed