tg-tag.sh: show ambiguous refname error
commit341420d41812ec5442d58d370dc91ebd8f78f800
authorKyle J. McKay <mackyle@gmail.com>
Wed, 14 Mar 2018 05:45:39 +0000 (13 22:45 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Wed, 14 Mar 2018 05:45:39 +0000 (13 22:45 -0700)
tree2397cc9406687b8f10aecdc5ca9d2dfcaf19c0b7
parentb186925706bf432d39deb27e766730df4df32fa4
tg-tag.sh: show ambiguous refname error

Unfortunately `git rev-parse --symbolic-full-name` does not obey the
precedence rules set out in `git help revisions`.  If more than one
of those possibilities match then it throws up its hands, vomits out
multiple complaints and gives up.

On the other hand, passing the same thing to `git rev-parse --verify`
will actually pick one according to the precedence rules just like
most Git commands will.

Keep the STDERR output of `git rev-parse --symbolic-full-name` just
in case and if we decide we are unhappy with the ref, dump out the
last line only of the multiple errors it may have spewed out before
complaining about an "invalid" ref name instead of "no such" ref name.

This gives a much better hint to the user about what's going on.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
tg-tag.sh