From c7ed23ef5cec0b238d7180a49f5369cfeabf061a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 5 Jun 2016 14:14:26 +0300 Subject: [PATCH] Add scripts to list/show remotes --- ls-remotes | 10 ++++++++++ show-remotes | 10 ++++++++++ show-remotes-not-synced | 12 ++++++++++++ 3 files changed, 32 insertions(+) create mode 100755 ls-remotes create mode 100755 show-remotes create mode 100755 show-remotes-not-synced diff --git a/ls-remotes b/ls-remotes new file mode 100755 index 0000000..5371f6f --- /dev/null +++ b/ls-remotes @@ -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 remote $verbose' diff --git a/show-remotes b/show-remotes new file mode 100755 index 0000000..1e7a8ee --- /dev/null +++ b/show-remotes @@ -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 remote | xargs -n1 git remote show' diff --git a/show-remotes-not-synced b/show-remotes-not-synced new file mode 100755 index 0000000..be4a404 --- /dev/null +++ b/show-remotes-not-synced @@ -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 -----"' -- 2.39.5