#! /bin/sh
-prog_dir=`dirname "$0"`
-"$prog_dir"/do-all \
+cd "`dirname \"$0\"`" &&
+prog_dir="`pwd`" &&
+export prog_dir
+
+exec "$prog_dir"/do-all \
'test "$g" = "$d/.git" || continue; cd "$d" &&' \
- 'echo "----- $d -----" && git status --short --branch || exit 1'
+ 'echo "----- $d -----" && "$prog_dir"/git-status.sh --short --branch || exit 1'
+++ /dev/null
-#! /bin/sh
-
-STMP="$HOME"/tmp/all-status-carefully.tmp
-export STMP
-trap 'exec rm -rf "$STMP"' 0 HUP INT QUIT TERM
-
-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`" ||' \
- 'git status --branch --short | grep -q "ahead\|behind" ) &&' \
- 'echo "----- $d -----" && git status --short --branch'
--- /dev/null
+#! /bin/sh
+
+STMP="$HOME"/tmp/git-status.tmp
+export STMP
+trap 'exec rm -rf "$STMP"' 0 HUP INT QUIT TERM
+rm -rf "$STMP" && mkdir "$STMP" &&
+
+GIT_INDEX_FILE="$STMP"/index &&
+export GIT_INDEX_FILE &&
+
+if [ -d .git -a -f .git/index ]; then
+ cp -p .git/index $GIT_INDEX_FILE
+else
+ echo "$0: `pwd` is not a git directory" >&2
+ exit 1
+fi &&
+
+git status "$@" &&
+exec rm -rf "$STMP"
#! /bin/sh
-exec "`dirname \"$0\"`"/do-all \
+cd "`dirname \"$0\"`" &&
+prog_dir="`pwd`" &&
+export prog_dir
+
+exec "$prog_dir"/do-all \
'test "$g" = "$d/.git" || continue; cd "$d" &&' \
- 'test -n "`git status --short`" && echo "$d"'
+ 'test -n "`"$prog_dir"/git-status.sh --short`" && echo "$d"'
+++ /dev/null
-#! /bin/sh
-
-LSTMP="$HOME"/tmp/ls-status-carefully.tmp
-export LSTMP
-trap 'exec rm -rf "$LSTMP"' 0 HUP INT QUIT TERM
-
-cd "`dirname \"$0\"`" && prog_dir="`pwd`" &&
-rm -rf "$LSTMP" && mkdir "$LSTMP" &&
-
-"$prog_dir"/do-all \
- 'test "$g" = "$d/.git" || continue;' \
- 'rsync -aW --del --protocol=28 "$d" "$LSTMP" && cd "$LSTMP/$b" &&' \
- 'test -n "`git status --short`" && echo "$d"'
for d in `"$prog_dir"/ls-dirty`
do
echo "----- $d -----" && cd "$d" &&
- git status || exit 1
+ "$prog_dir"/git-status.sh || exit 1
done
+++ /dev/null
-#! /bin/sh
-
-STMP="$HOME"/tmp/status-dirty-carefully.tmp
-export STMP
-trap 'exec rm -rf "$STMP"' 0 HUP INT QUIT TERM
-
-cd "`dirname \"$0\"`" && prog_dir="`pwd`" &&
-rm -rf "$STMP" && mkdir "$STMP" &&
-
-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