tg: reduce subshell creation phase II
commit91278ca973563583bd6c7b0be6a54a7747cfff1d
authorKyle J. McKay <mackyle@gmail.com>
Tue, 20 Feb 2018 10:22:23 +0000 (20 02:22 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Tue, 20 Feb 2018 10:22:23 +0000 (20 02:22 -0800)
treed1b2457baf9e03fb76368cd57586d044a3fc05b2
parentb4b99e097df5dd4e403cd81af3119f90f972d0ce
tg: reduce subshell creation phase II

Continue eliminating excess subshell invocations.

In this phase replace all uses of ref_exists_rev and ref_exists_rev_short
with the new replacements v_ref_exists_rev and v_ref_exists_rev_short.

Use of rev_parse_tree is also replaced by v_rev_parse_tree but it's only
used internally by the branch_annihilated function which has been mostly
superseded by the much faster awk support.

With these changes the branch_empty and branch_contains functions can
potentially avoid spawning any subshells provided the cache is up-to-date.

This provides yet another nice minor speed boost to `tg summary`.

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