From: Oleg Broytman Date: Sun, 23 Mar 2014 23:02:18 +0000 (+0400) Subject: List dirty repositories X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=128c605a1b8968935a4a266ff91359a4954e54fb;p=git-scripts.git List dirty repositories List repositories that have modified or untracked files; show status. --- diff --git a/ls-dirty b/ls-dirty new file mode 100755 index 0000000..e5d64da --- /dev/null +++ b/ls-dirty @@ -0,0 +1,5 @@ +#! /bin/sh + +exec "`dirname \"$0\"`"/do-all \ + 'test "$g" = "$d/.git" || continue; cd "$d" &&' \ + 'test -n "`git status -s`" && echo "$d"' diff --git a/status-dirty b/status-dirty new file mode 100755 index 0000000..c8a199b --- /dev/null +++ b/status-dirty @@ -0,0 +1,8 @@ +#! /bin/sh + +prog_dir=`dirname "$0"` +for d in `"$prog_dir"/ls-dirty` +do + echo "----- $d -----" && cd "$d" && + git status || exit 1 +done