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

Re: RFC: Making submodules "track" branches

From
Marc Branchaud <marcnarc@xiplink.com>
Date
Jun 8, 2010, 19:32 UTC
Message-ID
<4C0E9AC7.7080802@xiplink.com>
In-Reply-To
<AANLkTimtWrp1yimeooJ-ptAaDoxwpUc5KOP9HJUxx0X2@mail.gmail.com>
On 10-06-08 12:09 PM, Ævar Arnfjörð Bjarmason wrote:
Show 9 quoted lines
> 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.

> 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.

> 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.

Show 7 quoted lines
>>  - It *may* be good enough to assume that matching branch names in the
>> super-repo and the submodules are in fact submodule-spanning branches.
> 
> That won't work for submodules that you don't control. I have a
> repository that includes a lot of foreign code, they have a lot of
> different names for their "main branch" between them. So it needs to
> be configurable in the superproject.
Good point.  I agree.
		M.
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 5 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.