git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: why '--init' in git-submodule update

From
FMFrancis Moreau <francis.moro@gmail.com>
Date
Nov 7, 2012, 07:10 UTC
Message-ID
<CAC9WiBhvEX8VCprytK8HMTdFX+iQE7K=a4cKb8MphhpDowaw6A@mail.gmail.com>
In-Reply-To
<20121105213004.GA2797@book.hvoigt.net>
Hi,
On Mon, Nov 5, 2012 at 10:30 PM, Heiko Voigt <hvoigt@hvoigt.net> wrote:
Show 13 quoted lines
> 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

Previous: Heiko Voigt
Message 3 of 3 in “why '--init' in git-submodule update”
  1. Francis MoreauNov 5, 2012
  2. Heiko VoigtNov 5, 2012
  3. Francis MoreauNov 7, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.