tg.sh: allow --top-bases to work for remotes
commit5e06d3a35af74cddf01a5278d631a272053424fd
authorKyle J. McKay <mackyle@gmail.com>
Sat, 10 Jun 2017 22:38:00 +0000 (10 15:38 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Sat, 10 Jun 2017 22:38:00 +0000 (10 15:38 -0700)
tree373e4140472b8641421f7c985664ead8edd4c7d7
parentb35400a61831121066c5d4a6135689d2aa69b03d
tg.sh: allow --top-bases to work for remotes

Make "--top-bases -r" show the correct top-bases location for
the current TopGit remote.

Also show help for the option with -h or --help and accept a
remote name after the "-r" to override any otherwise set remote.

Use the same logic that "tg remote" uses to sniff out the correct
top-bases location for the remote.

Add tests for the new functionality.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
t/t1020-top-bases-sniff-out.sh
tg.sh