From: Oleg Broytman Date: Mon, 9 Jan 2017 17:06:51 +0000 (+0300) Subject: Test dirty status or not pushed state X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=commitdiff_plain;h=4a0a2bbf6e27d62d4a640ab41baa9675068a68bb Test dirty status or not pushed state --- diff --git a/all-status-carefully b/all-status-carefully index 97c2c4b..d0bafa5 100755 --- a/all-status-carefully +++ b/all-status-carefully @@ -10,5 +10,6 @@ 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' + '( test -n "`git status --short`" ||' \ + 'git status --branch --short | grep -q "ahead\|behind" ) &&' \ + 'echo "----- $d -----" && git status --short --branch'