Escape --upload-pack from expr.
Recent commit ae1dffcb28
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 <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
76f8a302c7
commit
4a91a1f37e
@ -27,7 +27,7 @@ do
|
||||
shift;;
|
||||
-u=*|--u=*|--up=*|--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;;
|
||||
--)
|
||||
shift; break ;;
|
||||
|
Reference in New Issue
Block a user