From f0db190b61cc4659a0819b634adaa0992b109461 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 28 Jan 2016 00:53:48 +0300 Subject: [PATCH] Carefully list dirty repos and show their status Copy every repo to a temp directory; this is very slow but prevents ``git status`` from touching real files. --- ls-dirty-carefully | 12 ++++++++++++ status-dirty-carefully | 13 +++++++++++++ 2 files changed, 25 insertions(+) create mode 100755 ls-dirty-carefully create mode 100755 status-dirty-carefully diff --git a/ls-dirty-carefully b/ls-dirty-carefully new file mode 100755 index 0000000..f723fd0 --- /dev/null +++ b/ls-dirty-carefully @@ -0,0 +1,12 @@ +#! /bin/sh + +cd "`dirname \"$0\"`" && PROG_DIR="`pwd`" && +cd "$HOME"/tmp && rm -rf ls-dirty-carefully.tmp && + +LSTMP="$HOME"/tmp/ls-dirty-carefully.tmp \ +"$PROG_DIR"/do-all \ + 'test "$g" = "$d/.git" || continue;' \ + 'rsync -aW --protocol=28 "$d" "$LSTMP" && cd "$LSTMP/$b" &&' \ + 'test -n "`git status -s`" && echo "$d"' && + +cd "$HOME"/tmp && exec rm -rf ls-dirty-carefully.tmp diff --git a/status-dirty-carefully b/status-dirty-carefully new file mode 100755 index 0000000..bdbf901 --- /dev/null +++ b/status-dirty-carefully @@ -0,0 +1,13 @@ +#! /bin/sh + +cd "`dirname \"$0\"`" && PROG_DIR="`pwd`" && +cd "$HOME"/tmp && rm -rf status-dirty-carefully.tmp && + +LSTMP="$HOME"/tmp/status-dirty-carefully.tmp \ +"$PROG_DIR"/do-all \ + 'test "$g" = "$d/.git" || continue;' \ + 'rsync -aW --protocol=28 "$d" "$LSTMP" && cd "$LSTMP/$b" &&' \ + 'test -n "`git status -s`" && echo "----- $d -----" &&' \ + 'git status --branch' && + +cd "$HOME"/tmp && exec rm -rf status-dirty-carefully.tmp -- 2.39.5