git.sh: quote all paths
This makes it handle spaces in paths. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
d52920e397
commit
d9c74a808e
4
git.sh
4
git.sh
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
cmd=
|
cmd=
|
||||||
path=$(dirname $0)
|
path=$(dirname "$0")
|
||||||
case "$#" in
|
case "$#" in
|
||||||
0) ;;
|
0) ;;
|
||||||
*) cmd="$1"
|
*) cmd="$1"
|
||||||
@ -11,7 +11,7 @@ case "$#" in
|
|||||||
echo "git version @@GIT_VERSION@@"
|
echo "git version @@GIT_VERSION@@"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
esac
|
esac
|
||||||
test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
|
test -x "$path/git-$cmd" && exec "$path/git-$cmd" "$@" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "Usage: git COMMAND [OPTIONS] [TARGET]"
|
echo "Usage: git COMMAND [OPTIONS] [TARGET]"
|
||||||
|
Reference in New Issue
Block a user