]> git.phdru.name Git - git-scripts.git/blobdiff - status-dirty-carefully
Minor refactoring: first echo then slow rsync
[git-scripts.git] / status-dirty-carefully
index 065dac07c9faa9c7c6be89552a9193f804555d41..26ab5bac7b013ccd3bf2d54d671999b4bb5ae265 100755 (executable)
@@ -1,13 +1,13 @@
 #! /bin/sh
 
-cd "`dirname \"$0\"`" && PROG_DIR="`pwd`" &&
+cd "`dirname \"$0\"`" && prog_dir="`pwd`" &&
 cd "$HOME"/tmp && rm -rf status-dirty-carefully.tmp &&
 
-LSTMP="$HOME"/tmp/status-dirty-carefully.tmp \
-"$PROG_DIR"/do-all \
-   'test "$g" = "$d/.git" || continue;' \
-   'rsync -aW --del --protocol=28 "$d" "$LSTMP" && cd "$LSTMP/$b" &&' \
-   'test -n "`git status -s`" && echo "----- $d -----" &&' \
-   'git status --branch' &&
+STMP="$HOME"/tmp/status-dirty-carefully.tmp &&
+for d in `"$prog_dir"/ls-dirty`
+do
+   echo "----- $d -----" && rsync -aW --del --protocol=28 "$d" "$STMP" &&
+   cd "$STMP/`basename $d`" && git status --branch
+done &&
 
 cd "$HOME"/tmp && exec rm -rf status-dirty-carefully.tmp