git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Chris Packham <judge.packham@gmail.com>,
	git@vger.kernel.org, mara.kim@vanderbilt.edu,
	Jonathan Nieder <jrnieder@gmail.com>,
	Heiko Voigt <hvoigt@hvoigt.net>
Subject: Re: [RFC PATCH] clone: add clone.recursesubmodules config option
Date: Thu, 05 Jun 2014 11:18:28 -0700	[thread overview]
Message-ID: <xmqq4mzzte2z.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <538F6E52.9000009@web.de> (Jens Lehmann's message of "Wed, 04 Jun 2014 21:06:58 +0200")

Jens Lehmann <Jens.Lehmann@web.de> writes:

> ... I believe we
> should have one or two switches telling Git "I want my submodules be
> updated without having to use the 'git submodule' command". And
> after that submodule specific overrides can kick in, e.g. when
> "submodule.<name>.update" is set to "none" the submodule won't be
> updated no matter how the default is.

OK, so submodule.*.update for each submodule, and a default value
for submodules that do not have submodule.*.update set to anything.

Sounds workable.

> We had two settings in mind,...
> So what if clone would just do an "git submodule init" for now when
> "submodule.autoinit" is set but "submodule.autoupdate" isn't [?]
> ... and a single "submodule.auto" setting would be what users really want?

I do not offhand think of a sensible scenario where you want to init
a submodule once but do not want to update it when the superproject
changes.  Even if the user uses the mode to detach the submodule
HEAD, i.e. the branches in submodules do not matter and the whole
tree is described by the superproject's commit and gitlinks recorded
in it, the user would want the new objects necessary for the updated
superproject, which means a submodule that is init'ed (whether it is
via "git submodule init" or the submodule.autoinit variable) must be
updated.

So I am not sure why a user wants to disable autoupdate in the first
place.  For the same reason, setting submodule.*.update to none
would not make much sense, either.  Perhaps I am missing something.

Unless the user is very conservative and suspects that these
recursive behaviour we are going to bolt on to various commands
could be buggy and untrustworthy, in which case the user might want
to manually run "git submodule update", or even run "git fetch"
after going there while bypassing the whole "git submodule".  But I
do not think that is healthy in the longer run.

  reply	other threads:[~2014-06-05 18:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 18:11 Paper cut bug: Why isn't "git clone xxxx" recursive by default? Mara Kim
2014-06-03 19:52 ` Junio C Hamano
2014-06-03 21:05   ` Junio C Hamano
2014-06-03 22:24     ` Mara Kim
2014-06-04  9:30     ` [RFC PATCH] clone: add clone.recursesubmodules config option Chris Packham
2014-06-04 17:24       ` Junio C Hamano
2014-06-04 19:06         ` Jens Lehmann
2014-06-05 18:18           ` Junio C Hamano [this message]
2014-06-05 18:43             ` W. Trevor King
2014-06-06  5:26             ` Heiko Voigt
2017-08-02 18:11               ` Jeremy Morton
2017-08-02 20:34                 ` Stefan Beller
2014-06-04 19:42         ` Heiko Voigt
2014-06-05  7:48           ` Chris Packham
2014-06-06  5:54             ` Heiko Voigt
2014-06-06 16:35               ` Junio C Hamano
2014-06-09 13:17               ` Jens Lehmann
2014-06-09 23:27                 ` W. Trevor King
2016-10-03 15:36       ` Jeremy Morton
2016-10-03 17:18         ` Stefan Beller
2016-10-04 11:41           ` Heiko Voigt

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq4mzzte2z.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=hvoigt@hvoigt.net \
    --cc=jrnieder@gmail.com \
    --cc=judge.packham@gmail.com \
    --cc=mara.kim@vanderbilt.edu \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).