Git-hooks pre-push script does not receive input via STDIN Git-hooks pre-push script does not receive input via STDIN bash bash

Git-hooks pre-push script does not receive input via STDIN


Apologies if this is stating the obvious, but if there's nothing to push, you won't get any lines on stdin. The sample .git/hooks/pre-push.sample has a while loop:

IFS=' 'while read local_ref local_sha remote_ref remote_shado    ...done

and that appears to work when I try it here with an echo inside that loop and nothing else - I get nothing when I have nothing to push, and output when I do.