aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwhat-branches.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/what-branches.py b/what-branches.py
index 4c90408..203b3d2 100755
--- a/what-branches.py
+++ b/what-branches.py
@@ -8,8 +8,7 @@ from sys import argv
for root in argv[1:] or listdir("."):
for head, dirs, files in walk(root):
- for dn in dirs:
- if dn == ".git" and not head.endswith("/gitolite"):
- print head
- for line in check_output(("git", "branch", "-a"), cwd = head).splitlines():
- print " ", line
+ if ".git" in dirs and not head.endswith("/gitolite"):
+ print head
+ for line in check_output(("git", "branch", "-a"), cwd = head).splitlines():
+ print " ", line