aboutsummaryrefslogtreecommitdiff
path: root/ssh-what-repos.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-06-18 19:02:17 -0400
committerRob Austein <sra@hactrn.net>2016-06-18 19:02:17 -0400
commitef27539ad71977b06683bbc304760f366ed4199e (patch)
tree86e66ba6003fb1e88d879300a7c826fbd1722fa4 /ssh-what-repos.py
parent6b1074775e5f62541a31240e8abf44b5cd95b700 (diff)
Add --prune to fetch commands; track (old) HTTPS configuration changes; general cleanup.
Diffstat (limited to 'ssh-what-repos.py')
-rwxr-xr-xssh-what-repos.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/ssh-what-repos.py b/ssh-what-repos.py
index 3e09720..6ecf6ed 100755
--- a/ssh-what-repos.py
+++ b/ssh-what-repos.py
@@ -4,12 +4,9 @@
# listing. Not useful unless you have an SSH account, sorry, and not
# really all that much more interesting than normal gitolite output.
-import json, subprocess
+from json import loads
+from subprocess import check_output
-cmd = "ssh git@git.cryptech.is info -json -lc"
-
-info = json.loads(subprocess.check_output(cmd.split()))
-
-for name in sorted(info["repos"]):
- if name != "gitolite-admin" and not any(c in name for c in "*?[]"):
- print name
+for repo in sorted(loads(check_output("ssh git@git.cryptech.is info -json -lc".split()))["repos"]):
+ if repo != "gitolite-admin" and not any(c in repo for c in "*?[]"):
+ print repo