fix t5600-clone-fail-cleanup.sh on windows

In windows you cannot remove current or opened directory,
an opened file, a running program, a loaded library, etc...

[jc: signoffs?  With a minor quoting fix.]

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Alex Riesen 2006-02-23 12:25:20 +01:00 committed by Junio C Hamano
parent 6dc78e696b
commit edd3ebfe27

View file

@ -118,7 +118,7 @@ dir="$2"
[ -e "$dir" ] && echo "$dir already exists." && usage
mkdir -p "$dir" &&
D=$(cd "$dir" && pwd) &&
trap 'err=$?; rm -r $D; exit $err' exit
trap 'err=$?; cd ..; rm -r "$D"; exit $err' exit
case "$bare" in
yes) GIT_DIR="$D" ;;
*) GIT_DIR="$D/.git" ;;