tg-depend.sh: expunge use of tsort
commit3b40308f792b068ec84fd59c40c78dd585917163
authorKyle J. McKay <mackyle@gmail.com>
Sat, 4 Feb 2017 04:24:49 +0000 (3 20:24 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Sat, 4 Feb 2017 04:24:49 +0000 (3 20:24 -0800)
treef506b723b7eba10cab087bdcc1916f37c09b3db9
parent1dfa7122e78350c5307aabb265868dad7f0767d6
tg-depend.sh: expunge use of tsort

Use of tsort to detect dependency loops is unreliable since
tsort is not required to "fail" if loops are present or output
anything particular that's guaranteed to be machine readable.

Instead use the same technique that the pre-commit.sh hook
does and just call recurse_deps to see if the newly added
dependency has a path to the current head.

This makes the command work as expected and eliminates a rather
unexpected (and now gone) dependency on the tsort command.

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