tg.sh: fully enable caching as designed
commitf242e03dca3d646e60cca021087ac58d17af4004
authorKyle J. McKay <mackyle@gmail.com>
Fri, 23 Jun 2017 15:53:33 +0000 (23 08:53 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 23 Jun 2017 15:53:33 +0000 (23 08:53 -0700)
tree33a54c719ef4544888717faedc03db31f5551515
parent1397b0c1a29940522dfc06670c81c63e40f6f859
tg.sh: fully enable caching as designed

Make the ref lookup caching work as-designed:

 1) unless tg_ref_cache_only is true fallback to rev-parse
 2) not found results are properly cached

If the cache existed and tg_ref_cache_only was false fallback was
failing to happen properly.

In a set -e environment not found results may not have been cached.

Fix both of these problems to improve speed.

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