tg-update.sh: allow returning to arbitrary HEADs
commitcf47263a8b095f97960ba4643b6f6f6ae5d3a002
authorKyle J. McKay <mackyle@gmail.com>
Fri, 24 Feb 2017 16:37:48 +0000 (24 08:37 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 24 Feb 2017 16:37:48 +0000 (24 08:37 -0800)
tree71e546eedf4988579d6bd661872fc8b2f62c91c8
parent7c2c3d0624663571c05b0b02bc84aba657cf36f7
tg-update.sh: allow returning to arbitrary HEADs

Allow a return to any valid, existing HEAD after a tg update
even if HEAD is a "non-traditional" symref or a symref to a
top-bases ref in the new location.

This avoids the surprising behavior of being switched from
a top-bases checkout to a non-base checkout after an update
or worse, suffering a bizarre failure if HEAD is a symref
to somewhere outside refs/heads/....

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