git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Junio C Hamano <gitster@pobox.com>, Heiko Voigt <hvoigt@hvoigt.net>
Cc: Charlie Dyson <charlie@charliedyson.net>, git@vger.kernel.org
Subject: Re: git-submodule.sh respects submodule.$name.update in .git/config but not .gitmodules
Date: Wed, 11 Dec 2013 23:26:17 +0100	[thread overview]
Message-ID: <52A8E689.80701@web.de> (raw)
In-Reply-To: <xmqqlhztvbi8.fsf@gitster.dls.corp.google.com>

Am 10.12.2013 00:40, schrieb Junio C Hamano:
> Heiko Voigt <hvoigt@hvoigt.net> writes:
> 
>> This notion has changed in a way that only the url (by that the name)
>> should be copied on init. The default for everything else should come
>> from .gitmodules or gits own default.
> 
> I think you need to be a bit careful here.  I do not think
> everything should blindly default to .gitmodules (otherwise there
> are obvious security implications as well as usability ones).

I believe everything except the URL should default to .gitmodules,
for the same reasons we already do that for fetch and ignore [1].
But it should not do so blindly and take precautions that this
only happens for safe values.

The only current exception is the update setting, but I'd like to
change that in two steps:

1) Teach git-submodule.sh to fall back to the update setting from
   .gitmodules if none is found in .git/config (more details below)

2) Wait some time and remove the copying on init later (to make
   life easier for people who are working on the same checkout
   with different versions of git).

>> The update configuration option was implemented before we realized that.
>> So currently it is still copied when submodule init is called. The main
>> reason is that we have not found the time to change that.
> 
> And 'update', as it allows any custom way to run it, is unlikely to
> be allowed to be used blindly from .gitmodules, no?

Definitely not. And while thinking about it it might make sense to
pass a list of allowed values for all configurations to the
get_submodule_config() function, making sure that fallbacks are only
used when they are safe.

[1] http://thread.gmane.org/gmane.comp.version-control.git/161193/focus=161357

  reply	other threads:[~2013-12-11 22:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-06 15:48 git-submodule.sh respects submodule.$name.update in .git/config but not .gitmodules Charlie Dyson
2013-12-09 22:35 ` Heiko Voigt
2013-12-09 23:40   ` Junio C Hamano
2013-12-11 22:26     ` Jens Lehmann [this message]
2013-12-11 22:44       ` W. Trevor King
2013-12-12  1:16         ` Junio C Hamano
2013-12-12 18:57           ` Jens Lehmann
2013-12-12 19:14             ` W. Trevor King
2013-12-12 19:23             ` Jonathan Nieder
2013-12-12 21:17             ` Junio C Hamano

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=52A8E689.80701@web.de \
    --to=jens.lehmann@web.de \
    --cc=charlie@charliedyson.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hvoigt@hvoigt.net \
    /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).