1. Stefan Saasen
  2. git

Commits

Jonas Fonseca  committed d9c74a8

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>

  • Participants
  • Parent commits d52920e
  • Branches master

Comments (0)

Files changed (1)

File git.sh

View file
 #!/bin/sh
 
 cmd=
-path=$(dirname $0)
+path=$(dirname "$0")
 case "$#" in
 0)	;;
 *)	cmd="$1"
 		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]"