#! /bin/sh set -e if [ "$#" = "1" ] && [ "$1" = "--all" ]; then set -- "$(git mktree < /dev/null)" fi ERRFILE="$(git rev-parse --git-dir)/whitespace.err" git diff --check "$@" > "$ERRFILE" || $EDITOR -q "$ERRFILE" rm "$ERRFILE"