]> git.phdru.name Git - git-scripts.git/blobdiff - all-status-carefully
Test dirty status or not pushed state
[git-scripts.git] / all-status-carefully
index 97c2c4b548d34e621a000a1091404b5d0703ecfe..d0bafa5d467ded6adf0f081c2dd5d03a555a70ed 100755 (executable)
@@ -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'