Re: [PATCH 2/2] tmp-objdir: quote paths we add to alternates
- From
Jeff King <peff@peff.net>
- Date
- Dec 13, 2016, 18:15 UTC
- Message-ID
- <20161213181538.6gv4it4b33uhbuud@sigill.intra.peff.net>
- In-Reply-To
- <xmqqwpf34s5f.fsf@gitster.mtv.corp.google.com>
On Tue, Dec 13, 2016 at 10:10:04AM -0800, Junio C Hamano wrote:
Show 5 quoted lines
> > - 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.After expansion, I don't think the shell will do any further processing except for whitespace splitting. E.g.:
$ debug() { for i in "$@"; do echo "got $i"; done; }
$ sep=';'
$ space=' '
$ debug foo${sep}bar
got foo;bar
$ debug foo${space}bar
got foo
got barI don't mind quoting it to make it more obvious, though.
-Peff