]> git.phdru.name Git - git-scripts.git/blobdiff - ls-dirty-carefully
Carefully list dirty repos and show their status
[git-scripts.git] / ls-dirty-carefully
diff --git a/ls-dirty-carefully b/ls-dirty-carefully
new file mode 100755 (executable)
index 0000000..f723fd0
--- /dev/null
@@ -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