Am 10.12.2013 00:40, schrieb Junio C Hamano:
> Heiko Voigt <> 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 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.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to