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>, "W. Trevor King" <wking@tremily.us>
Cc: Heiko Voigt <hvoigt@hvoigt.net>,
	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: Thu, 12 Dec 2013 19:57:51 +0100	[thread overview]
Message-ID: <52AA072F.2000105@web.de> (raw)
In-Reply-To: <7vtxeeuaw7.fsf@alter.siamese.dyndns.org>

Am 12.12.2013 02:16, schrieb Junio C Hamano:
> "W. Trevor King" <wking@tremily.us> writes:
> 
>> For
>> safety, maybe the default `init` should copy *everything* into
>> .git/config, after which users can remove stuff they'd like to
>> delegate to .gitmodules.
> 
> Copying everything into config is "be unsafe and inconvenient by
> default for everybody", isn't it?  Folks who want safety are forced
> to inspect the resulting entries in their config file (which is more
> inconvenent if you compare with the design where nothing is copied
> and nothing dynamically defaults to what then-current .gitmodules
> happens to contain).  Folks who trust those who update .gitmodules
> for them are forced to update their config every time upstream
> decides to use different settings in .gitmodules, because they have
> stale values in their config that mask what are in .gitmodules.
> 
> I think the solution we want is to copy only minimum to the config
> (and that "minimum" may turn out to be "nothing"), and to default
> keys that are only absolutely safe to .gitmodules file.

I agree and will prepare a patch for that.

What about teaching "git submodule sync" the "--url", "--update",
"--fetch", "--ignore", "--branch" and "--all" options to allow the
user to copy the current settings he wants from .gitmodules to
.git/config (but only safe values of course)? Trevor, would you be
ok to issue another command to copy everything to .git/config?

  reply	other threads:[~2013-12-12 18:58 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
2013-12-11 22:44       ` W. Trevor King
2013-12-12  1:16         ` Junio C Hamano
2013-12-12 18:57           ` Jens Lehmann [this message]
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=52AA072F.2000105@web.de \
    --to=jens.lehmann@web.de \
    --cc=charlie@charliedyson.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hvoigt@hvoigt.net \
    --cc=wking@tremily.us \
    /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).