Subject: Re: [PATCH 2/2] tmp-objdir: quote paths we add to alternates

From: Junio C Hamano <[email-masked]>
Date: Tue, 13 Dec 2016 10:10:04 -0800

Jeff King <[email-masked]> writes:

> The naive conversion is just:
> ...
> -# MINGW does not allow colons in pathnames in the first place
> -test_expect_success !MINGW 'push to repo path with colon' '
> +if test_have_prereq MINGW
> +then
> +	path_sep=';'
> +else
> +	path_sep=':'
> +fi
> ...
> -	git clone --bare . xxx:yyy.git &&
> +	git clone --bare . xxx${path_sep}yyy.git &&

Don't you want to dq the whole thing to prevent the shell from
splitting this into two commands at ';'?  The other one below is OK.

>  
>  	echo change >>file.bin &&
>  	git commit -am change &&
>  	# Note that we have to use the full path here, or it gets confused
>  	# with the ssh host:path syntax.
> -	git push "$PWD/xxx:yyy.git" HEAD
> +	git push "$PWD/xxx${path_sep}yyy.git" HEAD
>  '
>  
>  test_done
>
> Does that work?
>
> -Peff