From 4fcca6c30797d33a16623912886dea20ef4b673c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 9 Jan 2017 20:03:34 +0300 Subject: [PATCH] Test status only in repos with worktrees --- all-status | 4 ++-- all-status-carefully | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/all-status b/all-status index 6f11e59..60ab248 100755 --- a/all-status +++ b/all-status @@ -2,5 +2,5 @@ prog_dir=`dirname "$0"` "$prog_dir"/do-all \ - 'echo "----- $d -----" && cd "$d" &&' \ - 'git status --short --branch || exit 1' + 'test "$g" = "$d/.git" || continue; cd "$d" &&' \ + 'echo "----- $d -----" && git status --short --branch || exit 1' diff --git a/all-status-carefully b/all-status-carefully index 8a767d2..97c2c4b 100755 --- a/all-status-carefully +++ b/all-status-carefully @@ -8,6 +8,7 @@ cd "`dirname \"$0\"`" && prog_dir="`pwd`" && rm -rf "$STMP" && mkdir "$STMP" && "$prog_dir"/do-all \ + 'test "$g" = "$d/.git" || continue;' \ 'rsync -aW --del --protocol=28 "$d" "$STMP" && cd "$STMP/$b" &&' \ 'test -n "`git status --short`" && echo "----- $d -----" &&' \ 'git status --short --branch' -- 2.39.2