From: Jeff King <peff@peff.net>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Marc Strapetz <marc.strapetz@syntevo.com>,
Jens Lehmann <Jens.Lehmann@web.de>,
Git mailing list <git@vger.kernel.org>
Subject: Re: git submodule should honor "-c credential.helper" command line argument
Date: Thu, 18 Feb 2016 23:30:20 -0500 [thread overview]
Message-ID: <20160219043019.GA14764@sigill.intra.peff.net> (raw)
In-Reply-To: <CA+P7+xpHNHVSJnVg3HwiBjWxRdSpLXCsm3GpWst=BNyhLMVd5A@mail.gmail.com>
On Thu, Feb 18, 2016 at 05:15:54PM -0800, Jacob Keller wrote:
> I am looking at this more and I am stuck as to how best to provide a
> test case.
>
> I think the problem as stated above is pretty straight forward, we
> just want to stop clearing GIT_CONFIG_PARAMETERS but I can't find an
> easy way to test that we've done the right thing. There are no current
> tests for using a credential helper with submodule update right now.
If you just want to test that GIT_CONFIG_PARAMETERS is left untouched in
the submodule, you can tweak any config setting that would impact the
newly-cloned repo. E.g. this:
unset GIT_COMMITTER_NAME
git config --global user.name='Global Name'
git -c user.name='Command-Line Name' clone repo-with-module foo
head -1 foo/.git/logs/HEAD
head -1 foo/.git/modules/sub/logs/HEAD
shows that the parent-level clone uses the "-c" name, but the submodule
does not.
That being said, I am not sure this is the right solution. In the thread
I linked earlier[1], Jens indicated he would prefer not to blindly share
config with the submodules, and I think I agree. Or are you proposing to
pick and choose the keys in GIT_CONFIG_PARAMETERS, and whitelist
credential.*?
In that case, obviously my test example would not work, though I think
that it might be fine to put "user.name" onto the whitelist (the things
we really would worry about is stuff like "core.worktree" that clearly
does not make sense to carry over into the submodule).
-Peff
[1] http://thread.gmane.org/gmane.comp.version-control.git/264840
next prev parent reply other threads:[~2016-02-19 4:30 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
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 [this message]
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=20160219043019.GA14764@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=jacob.keller@gmail.com \
--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).