Introduce git_reference_shorthand

Generate a shorthand name out of the full refname.
remote: make default tag retrieving behaviour consistent

Default for newly created remotes will be auto.
Default when loading existing remotes with no tag retrieving behaviour set, was already auto.
Proposal to handle default value (auto = 0)
Merge pull request #1623 from yorah/fix/tag_auto

remote: make default tag retrieving behaviour consistent
Merge pull request #1559 from carlosmn/ref-shorthand

Introduce git_reference_shorthand