Re: [PATCH 1/6] run-command: add "use shell" option
- From
Erik Faye-Lund <kusmabite@googlemail.com>
- Date
- Dec 30, 2009, 13:55 UTC
- Message-ID
- <40aa078e0912300555x5beb1f0ejc27fd544856f6da1@mail.gmail.com>
- In-Reply-To
- <20091230105316.GA22959@coredump.intra.peff.net>
On Wed, Dec 30, 2009 at 11:53 AM, Jeff King <peff@peff.net> wrote:
Show 12 quoted lines
> Many callsites run "sh -c $CMD" to run $CMD. We can make it > a little simpler for them by factoring out the munging of > argv. > > For simple cases with no arguments, this doesn't help much, but: > > 1. For cases with arguments, we save the caller from > having to build the appropriate shell snippet. > > 2. We can later optimize to avoid the shell when > there are no metacharacters in the program. >
Nice. This could be helpful if we ever decide not to depend on a sh-compatible shell on Windows (since one isn't included by default no Windows, and installing msys/cygwin has some compatibility-issues with previous installations).
-- Erik "kusma" Faye-Lund