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

Re: Add an option to automatically submodule update on checkout

From
Stefan Beller <sbeller@google.com>
Date
May 8, 2017, 17:15 UTC
Message-ID
<CAGZ79kbNEAL6dYFPzquDDAsMNqpFsE3_VEHXeKu1VuaLV+m8_w@mail.gmail.com>
In-Reply-To
<20170508170846.GD179149@google.com>
On Mon, May 8, 2017 at 10:08 AM, Brandon Williams <bmwill@google.com> wrote:
Show 14 quoted lines
>>
>> >[submodule "gnulib"]
>> >    path=./gnulib
>> >    external = true # implies no branch for checkout -b --recurse-submodules
>>
>> >I think there are a couple more situations where such "external" submodules are treated differently, so maybe we'd want to think carefully about the >actual name as different workflows would want to have different features for an internal/external submodule.
>>
>> I didn't want to open up that one, but yes. That makes sense. However, I don't like overloading what "external" means or might mean in the future. Would you consider a distinct Boolean for that, like inherit-branch=true?
>
> Something like that kind of already exists.  The 'branch' field.
> Internal repos would most likely use the '.' value to indicate that the
> submodules should track the superproject's branch.  While a value of say
> 'foo' would indicate that the submodule should always be on branch
> 'foo'; this could be used for external repositories.

so for external repos you'd keep the branch unset, such that you strictly checkout the sha1 object into a detached HEAD.

Makes sense.

Thanks, Stefan

Previous: Brandon WilliamsNext: Junio C Hamano
Message 8 of 11 in “Add an option to automatically submodule update on checkout”
  1. Ciro SantilliMay 6, 2017
  2. Randall S. BeckerMay 8, 2017
  3. Stefan BellerMay 8, 2017
  4. Randall S. BeckerMay 8, 2017
  5. Stefan BellerMay 8, 2017
  6. Randall S. BeckerMay 8, 2017
  7. Brandon WilliamsMay 8, 2017
  8. Stefan BellerMay 8, 2017
  9. Junio C HamanoMay 9, 2017
  10. Randall S. BeckerMay 9, 2017
  11. Brandon WilliamsMay 8, 2017

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.