Skip to content

Commit d9c74a8

Browse files
jonasJunio C Hamano
authored andcommitted
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>
1 parent d52920e commit d9c74a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
cmd=
4-
path=$(dirname $0)
4+
path=$(dirname "$0")
55
case "$#" in
66
0) ;;
77
*) cmd="$1"
@@ -11,7 +11,7 @@ case "$#" in
1111
echo "git version @@GIT_VERSION@@"
1212
exit 0 ;;
1313
esac
14-
test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
14+
test -x "$path/git-$cmd" && exec "$path/git-$cmd" "$@" ;;
1515
esac
1616

1717
echo "Usage: git COMMAND [OPTIONS] [TARGET]"

0 commit comments

Comments
 (0)