From: Oleg Broytman Date: Wed, 27 Jan 2016 21:53:48 +0000 (+0300) Subject: Carefully list dirty repos and show their status X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=f0db190b61cc4659a0819b634adaa0992b109461;p=git-scripts.git 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. --- 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