In my post-receive hook, I would like to get the branch the user is committing on, store in a variable, and pass it to a web service (Hudson build system). Can I use the refname passed into STDIN for this? If so, how do I get it? I’ve tried
$3, but this doesn’t seem to work.
Also, adding the line
echo $3
shows just a blank.
Thanks!
Yes, you probably want the one(s) from STDIN. There may be more than one.
If you don’t want to convert your script you can do
instead, to have it process STDIN running self with input as arguments.