From: Junio C Hamano <gitster@pobox.com>
To: Heiko Voigt <hvoigt@hvoigt.net>
Cc: git@vger.kernel.org, Jens Lehmann <jens.lehmann@web.de>,
Lars Hjemli <hjemli@gmail.com>
Subject: Re: [RFC] What to you think about a loose status for submodules?
Date: Wed, 21 Oct 2009 13:23:19 -0700 [thread overview]
Message-ID: <7vy6n4339k.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20091021160122.GA2067@book.hvoigt.net> (Heiko Voigt's message of "Wed\, 21 Oct 2009 18\:01\:23 +0200")
Heiko Voigt <hvoigt@hvoigt.net> writes:
> For such a workflow I would like to implement what I call 'loose'
> submodules. Where a
>
> git clone project.git
> cd project
> git submodule init && git submodule update
>
> would omit the 'help' folder. But in case I specify it directly like
I thought a blanket "submodule init/update" wasn't even a recommended
practice for this exact reason. We tried to keep the default not to
gratuitously populate and checkout all submodule repositories, but
probably what you are trying to do was made more difficult by mistake
because people who wanted the other behaviour pushed too hard?
Defaulting to "do not populate and checkout unless explicitly asked"
sounds like the right thing to do, and if we broke it, it should be
corrected, I think. Shouldn't it be a simple matter of teaching "--all"
option to "submodule init" (and "update") to let them blindly affect all
submodules, while making the default not to do anything?
> git submodule init help
>
> it would update to the recorded revision.
>
> Of course the relation would be configurable. E.g.:
>
> git config submodule."name".relation loose
>
> and the opposite as
>
> git config submodule."name".relation tight
I do not think this should be a project-wide configuration that is
recorded in .gitmodules; if you are "help documentation" participant to
the project you would want "help" submodule, and other people will want
different submodules.
It would probably make more sense to introduce the notion of "module
groups", similar to the way "remote update <group>" can name a group of
remotes to affect. Then documentation people can say
submodule init doc && submodule update
if .gitmodules file records the mapping from "doc" to one or more
submodules (e.g. "help" and "doc"). If we are going to take this route,
it would still make sense to teach "--all" to "submodule init" and perhaps
default to init the "default" group if one exists, instead of making the
parameterless "init" a no-op as I suggested earlier.
But it is quite a long time since I looked at git-submodule.sh so please
take the above with a healthy dose of salt.
next prev parent reply other threads:[~2009-10-21 20:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-21 16:01 [RFC] What to you think about a loose status for submodules? Heiko Voigt
2009-10-21 20:23 ` Junio C Hamano [this message]
2009-10-22 19:44 ` Heiko Voigt
2009-10-22 19:58 ` Junio C Hamano
2010-01-20 18:16 ` Heiko Voigt
2010-01-20 19:45 ` 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=7vy6n4339k.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=hjemli@gmail.com \
--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).