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

Re: RFC: submodule terminology

From
Shawn O. Pearce <spearce@spearce.org>
Date
May 21, 2007, 06:52 UTC
Message-ID
<20070521065234.GM3141@spearce.org>
In-Reply-To
<1179729886.6187.15.camel@localhost>
Raimund Bauer <ray007@gmx.net> wrote:
Show 11 quoted lines
> On Sun, 2007-05-20 at 15:59 -0700, Junio C Hamano wrote:
> > I was wondering if we can get away by just calling them
> > "projects", "projects containd in the superproject", etc., as I
> > tend to agree with Linus, who used the term "superproject
> > support" in his talk, that this is not really about creating
> > "subproject" which are somehow different from ordinary projects,
> > but more about supporting superprojects that can contain/point
> > at other projects, which we did not have before 1.5.2 happened.
> 
> The "super" or "sub" only comes from where in a hierarchy it is used.
> Somewhere in the middle of the hierarchy it would be both?
Yes.  Of course.
 
> I'd have said a repository can have many "modules" or "projects", and
> each of those can have several branches. A module can hold other
> modules, but from its POV also be part of a super-module (or
> superproject), we just have to take care to not build loops.
You cannot build a loop.  OK, let me rephrase:

I can build a loop where at one point in time project A uses project B as his subproject; then later I can have project B use project A as a subproject. That's a loop. But the commits themselves are not in a cycle. There is a specific version of A that requires a specific version of B, and there is a different version of B that requires an entirely different version of A.

This loop really just means we have to be smart about how we switch between versions of a project. Just like if B is required in one version of superproject A and not in another; when I switch back and forth in A I expect B to appear/disappear. And I expect it to work on an airplane, where network access to reclone B is not available (or is too costly). That means we have to "hide" B when its not needed.

If you can actually form a loop where version of A requires version of B and version of B requires the version of A that requires the version of B... that's a SHA-1 hash collision. If you can make them at will, you probably can make some good money illegally...

> Is my view of the world correct so far?
Yes.
-- 
Shawn.
Previous: Raimund BauerNext: Martin Waitz
Message 6 of 10 in “RFC: submodule terminology”
  1. Martin WaitzMay 20, 2007
  2. Johan HerlandMay 20, 2007
  3. Junio C HamanoMay 20, 2007
  4. Johan HerlandMay 20, 2007
  5. Raimund BauerMay 21, 2007
  6. Shawn O. PearceMay 21, 2007
  7. Martin WaitzMay 20, 2007
  8. Johan HerlandMay 20, 2007
  9. Martin WaitzMay 20, 2007
  10. Eric LeshMay 21, 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.