Re: [PATCH] git submodule foreach: Skip eval for more than one argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 4, 2014 at 3:57 PM, Matthijs Kooijman <matthijs@xxxxxxxx> wrote:
> On Tue, Mar 04, 2014 at 03:53:24PM +0100, Johan Herland wrote:
>> What would you expect echo '$name' to do?
> If I run git submodule foreach each '$name', then my shell eats the
> single quotes (which are only to prevent my shell from interpreting
> $name). git submodule will see $name, so it will run echo $name, not
> echo '$name'.
>
>> What happens if you use double instead of single quotes?
> Then my shell eats up the double quotes _and_ replaces $name with
> nothing, so I can't expect git submodule to replace it with the
> submodule name then :-)
>
> Does that help to clarify what I mean?

Ok, so IINM, Anders' original commit was about making "git submodule
foreach <command>" behave more like "<command>" (from a naive user's
perspective), while you rather expect to insert quotes/escapes to
finely control exactly when shell interpretation happens. Aren't these
POVs mutually incompatible? Is the only 'real' solution to forbid
multitple arguments, and force everybody to quote the entire command?

I don't particularly care which way it goes, as long as (a) the common
case behaves as most users would expect, (b) the uncommon/complicated
case is still _possible_ (though not necessarily simple), and (c) we
don't break a sizable number of existing users.

...Johan

-- 
Johan Herland, <johan@xxxxxxxxxxx>
www.herland.net
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]