From: Oleg Broytman Date: Tue, 2 Aug 2016 19:55:01 +0000 (+0300) Subject: List not pushed repositories carefully X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=c48617fadacbae620b1b454360948df730a3e250;p=git-scripts.git List not pushed repositories carefully Get status without touching the repo (by using a temporary copy). --- diff --git a/ls-not-pushed-carefully b/ls-not-pushed-carefully new file mode 100755 index 0000000..29384e7 --- /dev/null +++ b/ls-not-pushed-carefully @@ -0,0 +1,12 @@ +#! /bin/sh + +cd "`dirname \"$0\"`" && PROG_DIR="`pwd`" && +cd "$HOME"/tmp && rm -rf ls-not-pushed-carefully.tmp && + +LSTMP="$HOME"/tmp/ls-not-pushed-carefully.tmp \ +"$PROG_DIR"/do-all \ + 'test "$g" = "$d/.git" || continue;' \ + 'rsync -aW --del --protocol=28 "$d" "$LSTMP" && cd "$LSTMP/$b" &&' \ + 'test -n "`git status -b | grep "ahead\|behind"`" && echo "$d"' && + +cd "$HOME"/tmp && exec rm -rf ls-not-pushed-carefully.tmp