git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Heiko Voigt <hvoigt@hvoigt.net>
Cc: git@vger.kernel.org, Jens Lehmann <jens.lehmann@web.de>
Subject: Re: [PATCH 0/2] Add an update=none option for 'loose' submodules
Date: Mon, 15 Aug 2011 13:37:53 -0700	[thread overview]
Message-ID: <7vy5yujtr2.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20110811195955.GA21185@book.hvoigt.net> (Heiko Voigt's message of "Thu, 11 Aug 2011 22:00:21 +0200")

Heiko Voigt <hvoigt@hvoigt.net> writes:

> On Thu, Aug 11, 2011 at 11:28:31AM -0700, Junio C Hamano wrote:
>> Heiko Voigt <hvoigt@hvoigt.net> writes:
>> 
>> > If a submodule is used to seperate some bigger parts of a project into
>> > an optional directory it is helpful to not clone/update them by default.
>> 
>> Sorry if I am slow, but I do not get this.
>> 
>> I thought unless you say "submodule init" once, a submodule you are not
>> interested in should not be cloned nor updated at all. If that is not the
>> case, isn't it a bug to be fixed without a new configuration variable that
>> fixes it only when it is set?
>
> What I usually do is say "submodule init" without any extra option once.
> That will register all submodules from .gitmodules in the config. Now
> when I say "submodule update" all submodules would be cloned. In the
> case of recursive submodules actually
>
> 	git submodule update --init --recursive
>
> is the only command which can get you really everything in one go.
>
> Do you think the "submodule init" behavior is wrong? If so I think its a
> bit late to change this since people using submodules (me included)
> already have got used to it.
>
> With this config variable all submodules will still be registered to
> .git/config on "submodule init" but "submodule update" will skip those
> submodules.

Ok, that sort-of makes sense, but we have been using "do we have the
submodule registered in the .git/config of the superproject?" to decide
"does the user interested in having a checkout of the submodule?" (I think
in the ancient days it was "do we have .git in that submodule directory?"
that decided it, but we dropped that because it won't work when switching
branches that has and does not have the submodule in superproject).

It is somewhat worrying that some parts of the system may still be using
that old criteria "do we have it in .git/config of the superproject?" to
decide if the user is interested in the submodule. If so they need to be
updated to take this new semantics "do we have it in .git/config without
its submodule.$name.update set to none" into account. We would probably
need to have a paragraph in the release notes to warn about the semantics
change (which I tend to agree with you that it is a good one).

>> > We have been talking about loose submodules for some time:
>> 
>> Also before introducing a new terminology "loose submodule", please define
>> it somewhere. It feels confusing to me that a normal submodule, which
>> shouldn't be auto-cloned nor auto-updated without "submodule init", needs
>> to be called by a name other than simply a "submodule" but with an
>> adjuctive "loose submodule".
>
> Thats why I avoided talking about it in the docs. For the commit message
> I thought it would be kind of intuitive but I can update the commit
> message so that it becomes more clear.

That sounds like a good thing to do.

Thanks.

  reply	other threads:[~2011-08-15 20:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11 17:51 [PATCH 0/2] Add an update=none option for 'loose' submodules Heiko Voigt
2011-08-11 17:51 ` [PATCH 1/2] submodule: move update configuration variable further up Heiko Voigt
2011-08-11 17:51 ` [PATCH 2/2] add update 'none' flag to disable update of submodule by default Heiko Voigt
2011-08-11 18:28 ` [PATCH 0/2] Add an update=none option for 'loose' submodules Junio C Hamano
2011-08-11 20:00   ` Heiko Voigt
2011-08-15 20:37     ` Junio C Hamano [this message]
2011-08-22 20:00       ` Heiko Voigt
2011-08-22 22:42         ` Junio C Hamano
2011-08-23 19:43           ` Heiko Voigt
2011-08-23 20:18             ` Jens Lehmann
2011-08-23 21:46               ` Junio C Hamano
2011-08-24 19:30                 ` Heiko Voigt
2011-08-26  6:27                   ` Junio C Hamano
2011-08-26 16:14                     ` Jens Lehmann
2011-08-24 20:38               ` 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

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

  git send-email \
    --in-reply-to=7vy5yujtr2.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=hvoigt@hvoigt.net \
    --cc=jens.lehmann@web.de \
    /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).