Skip to content

Commit

Permalink
git.sh: quote all paths
Browse files Browse the repository at this point in the history
This makes it handle spaces in paths.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Jonas Fonseca authored and Junio C Hamano committed Oct 10, 2005
1 parent d52920e commit d9c74a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

cmd=
path=$(dirname $0)
path=$(dirname "$0")
case "$#" in
0) ;;
*) cmd="$1"
Expand All @@ -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]"
Expand Down

0 comments on commit d9c74a8

Please sign in to comment.