]> git.phdru.name Git - git-scripts.git/blobdiff - show-remotes-not-synced
Add scripts to list/show remotes
[git-scripts.git] / show-remotes-not-synced
diff --git a/show-remotes-not-synced b/show-remotes-not-synced
new file mode 100755 (executable)
index 0000000..be4a404
--- /dev/null
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+if [ "$1" = "-v" ]; then
+   verbose="--verbose"
+fi
+export verbose
+
+exec "`dirname \"$0\"`"/do-all \
+   'test "$g" = "$d/.git" || continue; cd "$d" &&' \
+   'not_up="`git remote | xargs -n1 git remote show | ' \
+   'grep -F \" pushes to \" | grep -Fv \"(up to date)\"`" &&' \
+   'test -n "$not_up" && echo "----- $d -----"'