title: need to parse refname in post-receive script
body: <p>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
  <code>$3</code>, but this doesn't seem to work.  </p>
  
  <p>Also, adding the line</p>
  
  <pre><code>echo $3
  </code></pre>
  
  <p>shows just a blank.</p>
  
  <p>Thanks!</p>