GNU bug report logs -
#16843
Error caused due to regression in git
Previous Next
Reported by: Darshit Shah <darnir <at> gmail.com>
Date: Sat, 22 Feb 2014 16:07:01 UTC
Severity: normal
Tags: notabug
Done: Eric Blake <eblake <at> redhat.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 02/24/2014 12:37 PM, Darshit Shah wrote:
>>> Based on the test that is failing, can you please show the output of:
>>>
>>> git submodule --quiet foreach echo 'a b' '"c d"'
>> What about:
>>
>> git submodule --quiet foreach 'echo a b "c d" "$sha1"'
>>
>
> The first command:
> git submodule --quiet foreach echo 'a b' '"c d"'
> gives the output: a b "c d"
Good, I was right - newer git is doing one less round of shell
interpolation, so the second layer of quotes that we were adding for
older git now show up as literal arguments in newer git.
> Where there is a double space between a and b while c and d still retain
> their quotes.
>
> The second command:
> git submodule --quiet foreach 'echo a b "c d" "$sha1"'
>
> Gives the output:
> a b c d 0ac90c5a98030c998f3e1db3a0d7f19d4630b6b6
Yay - you confirmed that the solution that works for both versions of
git is to ensure that we provide exactly one argument to the foreach
command, where that argument gets passed through the shell with
identical results. I'll patch maint.mk shortly.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 11 years and 87 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.