tg-tag: prefer refs/heads disambiguations
commit22eb05e99af26603ce354804597bd52af42c38ac
authorKyle J. McKay <mackyle@gmail.com>
Wed, 14 Mar 2018 06:23:11 +0000 (13 23:23 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Wed, 14 Mar 2018 06:23:11 +0000 (13 23:23 -0700)
tree67809780572f779c9238e47cb1861fdf58f6fe26
parent341420d41812ec5442d58d370dc91ebd8f78f800
tg-tag: prefer refs/heads disambiguations

While `tg revert` deals mainly in `tag` objects typically located
under `refs/tags/...`, `tg tag` deals with branches typically located
under `refs/heads/...`.

Instead of complaining and dying when a branch and tag with the
same name exist and the "short" branch name is given, go ahead and
prefer the `refs/heads/...` interpretation if that's an existing
ref name.  This is almost always the correct DWIM interpretation.

Also update the documentation to make this DWIM interpretation clear.

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