X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=ls-not-pushed-carefully;h=85fc57c27396fc30aa022e970ed098500fd753f0;hb=4fcca6c30797d33a16623912886dea20ef4b673c;hp=f5d59284fe87ed6520006140d5588f7b5642b904;hpb=32993f082a53718cf86afed2f43dff6d73143277;p=git-scripts.git diff --git a/ls-not-pushed-carefully b/ls-not-pushed-carefully index f5d5928..85fc57c 100755 --- a/ls-not-pushed-carefully +++ b/ls-not-pushed-carefully @@ -1,13 +1,13 @@ #! /bin/sh +LSTMP="$HOME"/tmp/ls-not-pushed-carefully.tmp +export LSTMP +trap 'exec rm -rf "$LSTMP"' 0 HUP INT QUIT TERM + cd "`dirname \"$0\"`" && prog_dir="`pwd`" && -cd "$HOME"/tmp && rm -rf ls-not-pushed-carefully.tmp && +rm -rf "$LSTMP" && mkdir "$LSTMP" && -LSTMP="$HOME"/tmp/ls-not-pushed-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 --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"'