Re: [PATCH 3/5] submodule: export sanitized GIT_CONFIG_PARAMETERS
- From
Jeff King <peff@peff.net>
- Date
- Apr 28, 2016, 15:36 UTC
- Message-ID
- <20160428153601.GD31063@sigill.intra.peff.net>
- In-Reply-To
- <CA+P7+xoJrU884n7xG_kof46TSg_4NwS=5+nZza8PM7D=YtsXng@mail.gmail.com>
On Thu, Apr 28, 2016 at 08:28:29AM -0700, Jacob Keller wrote:
Show 13 quoted lines
> > diff --git a/git-submodule.sh b/git-submodule.sh > > index 2a84d7e..3a40d4b 100755 > > --- a/git-submodule.sh > > +++ b/git-submodule.sh > > @@ -200,6 +200,7 @@ sanitize_submodule_env() > > sanitized_config=$(git submodule--helper sanitize-config) > > clear_local_git_env > > GIT_CONFIG_PARAMETERS=$sanitized_config > > + export GIT_CONFIG_PARAMETERS > > why not > > export GIT_CONFIG_PARAMETERS=$santized_config
Portability. Try:
$ dash -c 'one="foo bar"; export two=$one; echo $two' foo
$ bash -c 'one="foo bar"; export two=$one; echo $two' foo bar
I think:
export GIT_CONFIG_PARAMETERS="$sanitized_config"
solves that. Some antique shells do not like "export x=y" at all, but I don't know if any of them are still relevant.
-Peff