tg.sh: recurse_deps provide _dep_has_remote and early termination
commit2b3f9fe944bca713e7d1df3324aa9cb8759b9ddb
authorKyle J. McKay <mackyle@gmail.com>
Mon, 20 Mar 2017 06:05:17 +0000 (19 23:05 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 20 Mar 2017 06:05:17 +0000 (19 23:05 -0700)
tree9ca1d10861518b32046d25da46a9847b1ea64f2c
parentca8da33860490795791dbed5dd4a8c8901824f4b
tg.sh: recurse_deps provide _dep_has_remote and early termination

The recurse_deps_internal function already calls has_remote on the
branch unless $no_remotes.  Make that result available in the new
_dep_has_remote variable when calling the recurse_deps CMD.

Also make it possible to abort the enumeration early but setting
_ret to a negative value (and provide a "0" default if somehow
_ret ends up empty).

And while in there add cleaner documentation about what variables
are available for use in the CMD that gets eval'd.

To pass the has_remote result back, recurse_deps_internal now emits
a "2" for tgish names that also have a remote branch.

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