From 4a0a2bbf6e27d62d4a640ab41baa9675068a68bb Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 9 Jan 2017 20:06:51 +0300 Subject: [PATCH] Test dirty status or not pushed state --- all-status-carefully | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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' -- 2.39.2