tg.sh: fix recurse_deps pre-order traversal with remotes enabled
commitd3aaa75ece406d1d398b3ffcfa97207cb4c47895
authorKyle J. McKay <mackyle@gmail.com>
Tue, 10 Nov 2015 13:07:40 +0000 (10 05:07 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Tue, 10 Nov 2015 13:07:40 +0000 (10 05:07 -0800)
tree746db32d3d68245a54b2e1e8d91c164db86f5889
parenta6e36d6cd03225f88c98ca2288859e4502ca5f5b
tg.sh: fix recurse_deps pre-order traversal with remotes enabled

Although there are currently no clients that use recurse_deps in
pre-order mode without also setting no_remotes, fix the output
in that case to be correct anyway.

And, as a result, add a tiny optimization that avoids calling
has_remote on non-tgish deps as it does not make sense to output
a dependency on remotes/<remote>/top-bases/<name> if <name> is
not a TopGit-controlled (and therefore tgish) branch.

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