GNU bug report logs - #16843
Error caused due to regression in git

Previous Next

Package: automake;

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


Message #14 received at 16843 <at> debbugs.gnu.org (full text, mbox):

From: Darshit Shah <darnir <at> gmail.com>
To: Eric Blake <eblake <at> redhat.com>
Cc: Bug-gnulib <bug-gnulib <at> gnu.org>, 16843 <at> debbugs.gnu.org
Subject: Re: bug#16843: Error caused due to regression in git
Date: Mon, 24 Feb 2014 20:37:46 +0100
[Message part 1 (text/plain, inline)]
On Mon, Feb 24, 2014 at 3:04 PM, Eric Blake <eblake <at> redhat.com> wrote:

> On 02/24/2014 07:00 AM, Eric Blake wrote:
>
> >
> > Based on the test that is failing, can you please show the output of:
> >
> >   git submodule --quiet foreach echo 'a  b' '"c  d"'
> >
> > On my version (1.8.5.3), I get 'a b c  d' (that is, echo saw three
> > arguments rather than 2, where only my 'c  d' argument survived because
> > it was double-quoted).  I'm guessing your version preserves extra
> > quotes, because it is not being passed through a layer of shell
> > interpretation?
>
> What about:
>
>   git submodule --quiet foreach 'echo a  b "c  d" "$sha1"'
>
> That is, does presenting the entire command as a single argument to git
> still manage to interpolate the shell variable and preserve the double
> space between c and d while doing word splitting between a and b?
>

The first command:
git submodule --quiet foreach echo 'a  b' '"c  d"'
gives the output: a  b "c  d"
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
So, it does seem to do word splitting between a and b, while retaining the
double space between c and d.


> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>


-- 
Thanking You,
Darshit Shah
[Message part 2 (text/html, inline)]

This bug report was last modified 11 years and 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.