I want to pass stdin to two different processes. What are some nice clean ways to do this?
(I'm proposing a tempfile based way as an answer below, but maybe there are better ways?)
GitHub's "git lfs pre-push" pre-push hook reads stdin. I want to install a second pre-push check, e.g. the WIP check I find in pre-push.sample. This means I need to save stdin in some reasonable way, so that the commits can be read by both "git lfs pre-push" and by the "while read local_ref local_sha remote_ref remote_sha" loop.