aboutsummaryrefslogtreecommitdiff
path: root/git.sh
diff options
context:
space:
mode:
authorJonas Fonseca <fonseca@diku.dk>2005-10-10 14:14:06 -0700
committerJunio C Hamano <junkio@cox.net>2005-10-10 14:14:06 -0700
commitd9c74a808e988146edd1f4ae463285554cb024bd (patch)
tree645b2dbe906d8a8ff103353fb2dc0df7972c0bba /git.sh
parentd52920e397918fdba0b0ac0bc46633fab807e681 (diff)
downloadgit-d9c74a808e988146edd1f4ae463285554cb024bd.tar.gz
git-d9c74a808e988146edd1f4ae463285554cb024bd.tar.xz
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>
Diffstat (limited to 'git.sh')
-rwxr-xr-xgit.sh4
1 files changed, 2 insertions, 2 deletions
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]"