diff options
author | Rob Austein <sra@hactrn.net> | 2016-06-19 14:13:29 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-06-19 14:13:29 -0400 |
commit | a07d639bf75fbe392a96ad91ffaeb0dbb63b865d (patch) | |
tree | 123e93f2d6e677633588d90e8d75d291d435a4b7 /what-remotes.py | |
parent | ef27539ad71977b06683bbc304760f366ed4199e (diff) |
Further trivial scripts.
Diffstat (limited to 'what-remotes.py')
-rwxr-xr-x | what-remotes.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/what-remotes.py b/what-remotes.py new file mode 100755 index 0000000..0359301 --- /dev/null +++ b/what-remotes.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +# +# List rmotes in local repository tree. + +from subprocess import check_output +from os import walk, listdir +from sys import argv + +for root in argv[1:] or listdir("."): + for head, dirs, files in walk(root): + if ".git" in dirs and not head.endswith("/gitolite"): + print head + for line in check_output(("git", "remote", "-v"), cwd = head).splitlines(): + print " ", line |