Re: [PATCH 2/2] tmp-objdir: quote paths we add to alternates
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 13, 2016, 18:10 UTC
- Message-ID
- <xmqqwpf34s5f.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20161213114414.masgfo7lf7e3utym@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> 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.
Show 14 quoted lines
>
> 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