From: Oleg Broytman Date: Mon, 9 Jan 2017 17:03:34 +0000 (+0300) Subject: Test status only in repos with worktrees X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=commitdiff_plain;h=4fcca6c30797d33a16623912886dea20ef4b673c Test status only in repos with worktrees --- 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'