From: Jonas Fonseca Date: Mon, 10 Oct 2005 21:14:06 +0000 (-0700) Subject: git.sh: quote all paths X-Git-Tag: v0.99.8d~9^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d9c74a808e988146edd1f4ae463285554cb024bd;p=git.git git.sh: quote all paths This makes it handle spaces in paths. Signed-off-by: Jonas Fonseca Signed-off-by: Junio C Hamano --- diff --git a/git.sh b/git.sh index dc383edde..1c73ca1c2 100755 --- a/git.sh +++ b/git.sh @@ -1,7 +1,7 @@ #!/bin/sh cmd= -path=$(dirname $0) +path=$(dirname "$0") case "$#" in 0) ;; *) cmd="$1" @@ -11,7 +11,7 @@ case "$#" in echo "git version @@GIT_VERSION@@" exit 0 ;; esac - test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;; + test -x "$path/git-$cmd" && exec "$path/git-$cmd" "$@" ;; esac echo "Usage: git COMMAND [OPTIONS] [TARGET]"