From: Jeff King <peff@peff.net>
To: Marc Strapetz <marc.strapetz@syntevo.com>
Cc: Jens Lehmann <Jens.Lehmann@web.de>, git@vger.kernel.org
Subject: Re: git submodule should honor "-c credential.helper" command line argument
Date: Tue, 2 Feb 2016 23:25:55 -0500 [thread overview]
Message-ID: <20160203042554.GA21179@sigill.intra.peff.net> (raw)
In-Reply-To: <56B0E3AA.30804@syntevo.com>
On Tue, Feb 02, 2016 at 06:13:14PM +0100, Marc Strapetz wrote:
> git -c credential.helper=helper submodule update --init submodule
>
> does not invoke "helper", but falls back to the default strategies.
> When configuring in ~/.gitconfig:
>
> [credential]
> helper=helper
>
> git submodule update --init submodule
>
> works fine. This behavior is somewhat unexpected -- is this a bug or by
> intention? In case intention, what's the recommended way to "inject"
> credentials helpers to work on submodules without modifying Git's config
> files?
>
> Tested with Git 2.5.0 (Windows).
I think the problem is that when git "switches" to working in the
submodule repository, it clears the environment, which includes any "-c"
command switches. This makes sense for some situations, but not for
others. This thread shows a similar problem:
http://thread.gmane.org/gmane.comp.version-control.git/264840
Jens suggested there adding an option to tell clone to pass specific
variables to the submodule, which I think makes sense. AFAIK, nobody has
done any work yet on that approach.
-Peff
next prev parent reply other threads:[~2016-02-03 4:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 17:13 git submodule should honor "-c credential.helper" command line argument Marc Strapetz
2016-02-03 4:25 ` Jeff King [this message]
2016-02-03 7:35 ` Jacob Keller
2016-02-03 8:08 ` Marc Strapetz
2016-02-03 23:44 ` Jacob Keller
2016-02-07 4:41 ` Jacob Keller
2016-02-07 13:48 ` Marc Strapetz
2016-02-08 3:44 ` Jacob Keller
2016-02-19 1:15 ` Jacob Keller
2016-02-19 4:30 ` Jeff King
2016-02-19 7:29 ` Jacob Keller
2016-02-19 7:46 ` Jeff King
2016-02-19 7:51 ` Jacob Keller
2016-02-19 17:33 ` Junio C Hamano
2016-02-19 19:34 ` Jacob Keller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160203042554.GA21179@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=marc.strapetz@syntevo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).