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>