3 STMP="$HOME"/tmp/git-status.tmp
5 trap 'exec rm -rf "$STMP"' 0 HUP INT QUIT TERM
6 rm -rf "$STMP" && mkdir "$STMP" &&
8 GIT_INDEX_FILE="$STMP"/index &&
9 export GIT_INDEX_FILE &&
11 if [ -d .git -a -f .git/index ]; then
12 cp -p .git/index $GIT_INDEX_FILE
14 echo "$0: `pwd` is not a git directory" >&2