tg.sh: speed up recurse_deps_internal
commit0b4acc2843cb6d187fa22a1a29d86258ce288884
authorKyle J. McKay <mackyle@gmail.com>
Fri, 18 Sep 2015 16:45:09 +0000 (18 09:45 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 18 Sep 2015 16:45:09 +0000 (18 09:45 -0700)
treee654b59f9cd0dfbaffc175be841018d000b00f7e
parentd6f24fdfc1512c90fabd2fcd9a8462064527d9ad
tg.sh: speed up recurse_deps_internal

By caching the results of previous callouts to the same
git command, recurse_deps_internal gets a large speed boost.

For complex dependency structures there are still a lot of
distinct git commands being run, but this prevents runaway
execution when several TopGit branches share one or more
depdendencies.

The execution time for some operations can be halved.

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