title: Convert full GIT ref to unambiguous short ref
body: <p>I have a bunch of GIT references obtained from:</p>
  
  <pre><code>git for-each-ref refs --format='%(refname)'
  </code></pre>
  
  <p>They are in the form <code>refs/heads/branchName</code>.
  How can I convert each to their unambiguous short name? The same as I would get from:</p>
  
  <pre><code>git for-each-ref refs --format='%(refname:short)'
  </code></pre>
  
  <p>There may be branches and tags with the same name. I need the full ref for <code>git update-ref</code> but would like to print more Porcelain style messages if possible.</p>