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

Re: git submodules

From
Nanako Shiraishi <nanako3@lavabit.com>
Date
Oct 17, 2009, 22:30 UTC
Message-ID
<20091018073039.6117@nanako3.lavabit.com>
In-Reply-To
<m3tyxydj8f.fsf@localhost.localdomain>
Quoting Jakub Narebski <jnareb@gmail.com>
Show 16 quoted lines
> Steven Noonan <steven@uplinklabs.net> writes:
>
>> We're using git submodules for the contributing libraries. When I
>> commit changes to those contribs, it correctly shows in the parent
>> repository that those folders have different revisions than what's
>> currently committed. However, if someone pulls those changes, it
>> doesn't automatically update the contribs to match the committed
>> version. But doing a pull or merge _should_ update the working tree to
>> match the committed versions. It does with file data, so why not
>> update the submodules? Especially if the submodule revision matched
>> the committed version -before- the pull. Why are we forced into using
>> 'git submodule update'?
>
> Because you might want not to use most current version of submodule,
> so git-pull shouldn't update submodules by default.  And because
> git-pull didn't learn --recursive option yet.
I don't think your description is correct. Steven is talking about what the command should do by default. If you checked out the current superproject, by default you should get the submodule that matches. If you don't want the most current version, you can checkout an older submodule yourself.
You may want to follow this discussion:
  http://thread.gmane.org/gmane.comp.version-control.git/130155/focus=130330
After stating that he isn't against the idea to make it automatic, Junio describes what needs to be done for it to happen and what are the corner cases that needs to be treated with care.
-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
Previous: Jakub NarebskiNext: Avery Pennarun
Message 3 of 4 in “git submodules”
  1. Steven NoonanOct 17, 2009
  2. Jakub NarebskiOct 17, 2009
  3. Nanako ShiraishiOct 17, 2009
  4. Avery PennarunOct 21, 2009

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.