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

2014-03-04 Thread Matthijs Kooijman
Hey Johan, > Ok, so IINM, Anders' original commit was about making "git submodule > foreach " behave more like "" (from a naive user's > perspective), Ok, that makes sense. > while you rather expect to insert quotes/escapes to finely control > exactly when shell interpretation happens. Well, I mo

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

2014-03-04 Thread Johan Herland
On Tue, Mar 4, 2014 at 3:57 PM, Matthijs Kooijman 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 inte

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

2014-03-04 Thread Matthijs Kooijman
On Tue, Mar 04, 2014 at 03:53:24PM +0100, Johan Herland wrote: > On Tue, Mar 4, 2014 at 2:51 PM, Matthijs Kooijman wrote: > > matthijs@grubby:~/test$ git submodule foreach echo '$name' > > Entering 'test' > > $name > > jherland@beta ~/test$ echo '$name' > $name > > What would you expect echo '$n

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

2014-03-04 Thread Johan Herland
On Tue, Mar 4, 2014 at 2:51 PM, Matthijs Kooijman wrote: > matthijs@grubby:~/test$ git submodule foreach echo '$name' > Entering 'test' > $name jherland@beta ~/test$ echo '$name' $name What would you expect echo '$name' to do? What happens if you use double instead of single quotes? ...Johan

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

2014-03-04 Thread Matthijs Kooijman
Hey folks, On Thu, Sep 26, 2013 at 04:10:15PM -0400, Anders Kaseorg wrote: > ‘eval "$@"’ created an extra layer of shell interpretation, which was > probably not expected by a user who passed multiple arguments to git > submodule foreach: It seems this patch has broken the use of $name, $path, et

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

2013-09-27 Thread Johan Herland
On Thu, Sep 26, 2013 at 10:10 PM, Anders Kaseorg wrote: > ‘eval "$@"’ created an extra layer of shell interpretation, which was > probably not expected by a user who passed multiple arguments to git > submodule foreach: > > $ git grep "'" > [searches for single quotes] > $ git submodule foreach gi

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

2013-09-26 Thread Anders Kaseorg
‘eval "$@"’ created an extra layer of shell interpretation, which was probably not expected by a user who passed multiple arguments to git submodule foreach: $ git grep "'" [searches for single quotes] $ git submodule foreach git grep "'" Entering '[submodule]' /usr/lib/git-core/git-submodule: 1: