From 4a91a1f37e8813bf3b7de00de5b3a7ab1df89451 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 30 Jan 2007 13:11:49 -0500 Subject: Escape --upload-pack from expr. Recent commit ae1dffcb28ee89a23f8d2747be65e17c8eab1690 by Junio changed the way --upload-pack was passed around between clone, fetch and ls-remote and modified the handling of the command line parameter parsing. Unfortunately FreeBSD 6.1 insists that the expression expr --upload-pack=git-upload-pack : '-[^=]*=\(.*\)' is illegal, as the --upload-pack option is not supported by their implementation of expr. Elsewhere in Git we use z as a leading prefix of both arguments, ensuring the -- isn't seen by expr. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- git-fetch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-fetch.sh') diff --git a/git-fetch.sh b/git-fetch.sh index c1f6e1e84..357cac28b 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -37,7 +37,7 @@ do ;; --upl=*|--uplo=*|--uploa=*|--upload=*|\ --upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*) - exec=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)') + exec=--upload-pack=$(expr "z$1" : 'z-[^=]*=\(.*\)') shift ;; -f|--f|--fo|--for|--forc|--force) -- cgit v1.2.1