From 128c605a1b8968935a4a266ff91359a4954e54fb Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 24 Mar 2014 03:02:18 +0400 Subject: [PATCH] List dirty repositories List repositories that have modified or untracked files; show status. --- ls-dirty | 5 +++++ status-dirty | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100755 ls-dirty create mode 100755 status-dirty 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 -- 2.39.5