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

Re: RFC: Making submodules "track" branches

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 8, 2010, 20:23 UTC
Message-ID
<AANLkTilYHfDrtCAcPPxB1AZnzch2ELTEiIFTW3N5LBEc@mail.gmail.com>
In-Reply-To
<4C0E9AC7.7080802@xiplink.com>
On Tue, Jun 8, 2010 at 19:32, Marc Branchaud <marcnarc@xiplink.com> wrote:
Show 14 quoted lines
> On 10-06-08 12:09 PM, Ævar Arnfjörð Bjarmason wrote:
>> On Tue, Jun 8, 2010 at 15:34, Marc Branchaud <marcnarc@xiplink.com> wrote:
>>>
>>> So, back to the issue at hand: Sometimes I want static (non-tracking)
>>> submodules, and sometimes I want dynamic (tracking) submodules.  IMO, this
>>> makes Ævar's proposed configuration-based approach impractical.  (Of course,
>>> I'm not looking to replicate svn's externals...)
>>
>> I'm proposing that you be able to configure how you want to handle
>> submodules on a per-submodule basis.
>
> Yes, and that's precisely the problem.  For a given submodule, sometimes it
> should track a branch and sometimes it shouldn't.  Having to edit a
> configuration to change that is impractical.
See below.
Show 7 quoted lines
>> The exact semantics that I proposed may be impractical for some
>> reason, but the idea is that it'd be opt in. We'd perhaps have
>> multiple approaches (via config) to submodules, instead of the current
>> monolithic scheme.
>
> Opting in or out can't just be a monolithic setting for each submodule.  A
> submodule's branch tracking has to be on or off depending on the circumstances.

I don't really get what the objection is exactly. How should "branch tracking" be achieved do you think?

Anyway, right now what we track is set in a monolithic fashion by a combination of a commit pointer in a tree and what's being versioned in .gitmodules. If you want to change anything that's where you have to do it.

Why should it be any different when the submodule isn't tracking a specific commit? I.e. when it's "track the latest version of $thingy, whatever that is", instead of "track version $version of $thingy".

Show 10 quoted lines
>> So if you didn't want a svn:externals like "always track trunk"
>> repository you'd just not set your superproject up to treat the
>> submodule like that.
>
> Yes, of course.
>
> I guess what I'm saying is that duplicating svn's externals doesn't seem all
> that useful to me and I'd rather see git do better.  I've no objection if
> folks want to have such a feature, but to me it's not what "submodules
> tracking branches" should be about.

Obviously I have no objection to doing better, but how specifically should that be done? If the semantics you want are "give me the latest version of $URL, whatever that is" then the SVN semantics are pretty good.

Previous: Marc BranchaudNext: Marc Branchaud
Message 6 of 21 in “RFC: Making submodules "track" branches”
  1. Ævar Arnfjörð BjarmasonJun 7, 2010
  2. Johan HerlandJun 8, 2010
  3. Marc BranchaudJun 8, 2010
  4. Ævar Arnfjörð BjarmasonJun 8, 2010
  5. Marc BranchaudJun 8, 2010
  6. Ævar Arnfjörð BjarmasonJun 8, 2010
  7. Marc BranchaudJun 9, 2010
  8. Jens LehmannJun 8, 2010
  9. Johan HerlandJun 8, 2010
  10. Jens LehmannJun 9, 2010
  11. Johan HerlandJun 9, 2010
  12. Steven MichalskeJun 9, 2010
  13. Johan HerlandJun 9, 2010
  14. Junio C HamanoJun 8, 2010
  15. Ævar Arnfjörð BjarmasonJun 8, 2010
  16. Jens LehmannJun 9, 2010
  17. Jens LehmannJun 9, 2010
  18. Marc BranchaudJun 9, 2010
  19. Ævar Arnfjörð BjarmasonJun 9, 2010
  20. nottrobinNov 20, 2012
  21. W. Trevor KingNov 20, 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.