git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* why '--init' in git-submodule update
@ 2012-11-05 16:30 Francis Moreau
  2012-11-05 21:30 ` Heiko Voigt
  0 siblings, 1 reply; 3+ messages in thread
From: Francis Moreau @ 2012-11-05 16:30 UTC (permalink / raw
  To: git

Hello,

I'm wondering why the --init option from git-submodule-update is not
at least the defaut. Or even wilder, why this option exists at all and
git-submodule-update always behave like --init was always passed.

Thanks
--
Francis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: why '--init' in git-submodule update
  2012-11-05 16:30 why '--init' in git-submodule update Francis Moreau
@ 2012-11-05 21:30 ` Heiko Voigt
  2012-11-07  7:10   ` Francis Moreau
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Voigt @ 2012-11-05 21:30 UTC (permalink / raw
  To: Francis Moreau; +Cc: git

Hi,

On Mon, Nov 05, 2012 at 05:30:51PM +0100, Francis Moreau wrote:
> I'm wondering why the --init option from git-submodule-update is not
> at least the defaut. Or even wilder, why this option exists at all and
> git-submodule-update always behave like --init was always passed.

That was a design decision. People may not be interested in all
submodules but just a subset they are working with. E.g. think of a
large media directory as a submodule the developers might not be
interested in having it around all the time because only the designers
are heavily working with it.

So the rationale is that you should ask for a certain submodule to be
initialized to get it. If there is demand for it we could of course think
about offering a config option in .gitmodules to allow enabling it by
default for some submodules.

Cheers Heiko

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: why '--init' in git-submodule update
  2012-11-05 21:30 ` Heiko Voigt
@ 2012-11-07  7:10   ` Francis Moreau
  0 siblings, 0 replies; 3+ messages in thread
From: Francis Moreau @ 2012-11-07  7:10 UTC (permalink / raw
  To: Heiko Voigt; +Cc: git

Hi,

On Mon, Nov 5, 2012 at 10:30 PM, Heiko Voigt <hvoigt@hvoigt.net> wrote:
> Hi,
>
> On Mon, Nov 05, 2012 at 05:30:51PM +0100, Francis Moreau wrote:
>> I'm wondering why the --init option from git-submodule-update is not
>> at least the defaut. Or even wilder, why this option exists at all and
>> git-submodule-update always behave like --init was always passed.
>
> That was a design decision. People may not be interested in all
> submodules but just a subset they are working with. E.g. think of a
> large media directory as a submodule the developers might not be
> interested in having it around all the time because only the designers
> are heavily working with it.
>

Thanks for explaining.

Another possible solution was to check if one or several submodules
are already checkout. If so then update only them. If none of them is
checkout then assume --init is passed and init all of them. Same if a
path is passed and this path corresponds to a submodule not checkout
yet.

--
Francis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-07  7:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-05 16:30 why '--init' in git-submodule update Francis Moreau
2012-11-05 21:30 ` Heiko Voigt
2012-11-07  7:10   ` Francis Moreau

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).