]> git.phdru.name Git - git-scripts.git/commitdiff
Add a script to list all branches in all repos
authorOleg Broytman <phd@phdru.name>
Mon, 30 May 2016 04:17:57 +0000 (07:17 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 4 Jun 2016 13:34:48 +0000 (16:34 +0300)
ls-branches [new file with mode: 0755]

diff --git a/ls-branches b/ls-branches
new file mode 100755 (executable)
index 0000000..1fa0ae5
--- /dev/null
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+if [ "$1" = "-v" ]; then
+   verbose="--verbose"
+fi
+export verbose
+
+exec "`dirname \"$0\"`"/do-all \
+   'test "$g" = "$d/.git" || continue; cd "$d" &&' \
+   'echo "----- $d -----"; git branch --all $verbose'