X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=ls-not-pushed-carefully;h=85fc57c27396fc30aa022e970ed098500fd753f0;hb=4c743f70d7dc070e235fc3b6fcfecbf592286327;hp=2bd0159f00db52d4701ffe67dc2d8f1c288f3d5f;hpb=309577a0b53a652d6e02486fea046fb837afb2f2;p=git-scripts.git diff --git a/ls-not-pushed-carefully b/ls-not-pushed-carefully index 2bd0159..85fc57c 100755 --- a/ls-not-pushed-carefully +++ b/ls-not-pushed-carefully @@ -1,13 +1,13 @@ #! /bin/sh -cd "`dirname \"$0\"`" && PROG_DIR="`pwd`" && -cd "$HOME"/tmp && rm -rf ls-not-pushed-carefully.tmp && +LSTMP="$HOME"/tmp/ls-not-pushed-carefully.tmp +export LSTMP +trap 'exec rm -rf "$LSTMP"' 0 HUP INT QUIT TERM -LSTMP="$HOME"/tmp/ls-not-pushed-carefully.tmp \ -"$PROG_DIR"/do-all \ +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 --branch --untracked-files=no | - grep "ahead\|behind"`" && echo "$d"' && - -cd "$HOME"/tmp && exec rm -rf ls-not-pushed-carefully.tmp + 'git status --branch --short | grep -q "ahead\|behind" && echo "$d"'