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

Re: [PATCH] git-submodule: provide easy way of adding new submodules

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 25, 2007, 07:09 UTC
Message-ID
<7vps3k33ze.fsf@assigned-by-dhcp.pobox.com>
In-Reply-To
<20070624210607.GC997MdfPADPa@greensroom.kotnet.org>
Sven Verdoolaege <skimo@kotnet.org> writes:
Show 26 quoted lines
> To make a submodule effectively usable, the path and
> a URL where the submodule can be cloned need to be stored
> in .gitmodules.  This subcommand takes care of setting
> this information after cloning the new submodule.
> Only the index is updated, so, if needed, the user may still
> change the URL or switch to a different branch of the submodule
> before committing.
>
> Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
> ---
> On Sun, Jun 24, 2007 at 10:50:48AM -0700, Junio C Hamano wrote:
>> Sven Verdoolaege <skimo@kotnet.org> writes:
>> 
>> > They're different because submodule update (which also calls module_clone)
>> > is performed on a module that already exists in the repo and
>> > was therefore checked out by git as an empty directory.  If you
>> > add a new submodule, then there is no reason for the subdirectory
>> > to exist already.
>> 
>> Ah, you are absolutely right.  Thanks for the clarification.
>> 
>> By the way, when I have to say "thanks for the clarification", I
>> think it is an indication that the relevant parts of the code
>> need a bit of commenting ;-).
>
> How's this ?

I am not sure about the usefulness of "-b branch" thing myself, but other than that, looks very sane to me.

Lars?
Previous: Sven VerdoolaegeNext: Sven Verdoolaege
Message 8 of 10 in “[RESEND] git-submodule: provide easy way of adding new submodules”
  1. [RESEND] git-submodule: provide easy way of adding new submodulesSven Verdoolaege, Jun 21, 2007
  2. Lars HjemliJun 23, 2007
  3. Junio C HamanoJun 23, 2007
  4. Junio C HamanoJun 23, 2007
  5. Sven VerdoolaegeJun 24, 2007
  6. Junio C HamanoJun 24, 2007
  7. git-submodule: provide easy way of adding new submodulesSven Verdoolaege, Jun 24, 2007
  8. Junio C HamanoJun 25, 2007
  9. Sven VerdoolaegeJul 3, 2007
  10. Junio C HamanoJul 4, 2007

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.