Re: git submodule should honor "-c credential.helper" command line argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 2, 2016 at 8:25 PM, Jeff King <peff@xxxxxxxx> wrote:
> 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
> --

Ok so I am not sure we even really need to use "-c" option in
git-clone considering that we can just use the same flow we do for
setting core.worktree values. I'll propose a patch with you two Cc'ed,
which I think fixes the issue. There may actually be a set of
configuration we want to include though, and the main issue I see is
that it won't get updated correctly whenever the parent configuration
changes.

Thanks,
Jake
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]