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>
Jonas Fonseca committed
Oct 10, 2005 at 14:14 UTC
d9c74a808e988146edd1f4ae463285554cb024bd
1 file changed
+2
-2
git.sh
+2
-2
@@ -1,7 +1,7 @@
1
#!/bin/sh
2
3
cmd=
4
-path=$(dirname $0)
4
+path=$(dirname "$0")
5
case "$#" in
6
0) ;;
7
*) cmd="$1"
@@ -11,7 +11,7 @@ case "$#" in
11
echo "git version @@GIT_VERSION@@"
12
exit 0 ;;
13
esac
14
- test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
14
+ test -x "$path/git-$cmd" && exec "$path/git-$cmd" "$@" ;;
15
esac
16
17
echo "Usage: git COMMAND [OPTIONS] [TARGET]"