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

Re: [PATCH] glossary: add "remote" and "submodule"

From
Stefan Beller <sbeller@google.com>
Date
May 27, 2015, 23:29 UTC
Message-ID
<CAGZ79kauSsZK3_X+zTwL8TKuZiHNMGvMZfoCemW9-K7RWgrgCA@mail.gmail.com>
In-Reply-To
<xmqqwpztiptw.fsf@gitster.dls.corp.google.com>
On Wed, May 27, 2015 at 4:05 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 31 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>>>> +[[def_submodule]]submodule::
>>>> +     A <<def_repository,repository>> inside another repository. The two
>>>> +     repositories have different history, though the outer repository
>>>> +     knows the commit of the inner repository.
>>>
>> ... But correctness trumps brevity indeed.
>
> I do not think the correct way is that much longer, though.
>
> A repository inside another repository. The two repositories have different history
> A repository that holds the history of a separate project inside another repository
>
> Heh, they are the same length, no?
>
>>
>>>
>>>        A repository that holds the history of a separate project
>>>        inside another repository (the latter of which is called
>>>        superproject).
>>
>> This is better than what I proposed, but confusing. When naming
>> a project a submodule, my mental standpoint is the superproject.
>> ("This project has the submodule foo and bar"). But In your description
>> the superproject is called "another repository".
>
> That is because you are adding an entry for "submodule" to the
> glossary, no?  I was writing from submodule's point of view, i.e. "I
> (submodule) is inside another repository, and my project is separate
> from that other repository's".

The submodule doesn't know it's a submodule though, so the point of view "I (as a submodule)" only happens rarely in the real world? I have a library in mind when talking about submodules. And the libraries maintainer may not care if their library is used as a submodule or just "make install"ed or just put somewhere in the filesystem

Usually submodules are only interesting from the superprojects point of view, like "I want to upgrade libfoo now, so I make a commit changing the gitlink of the submodule to point at that tag/commit" That's why I found the presented perspective a bit strange.

Show 9 quoted lines
>
>>>        The containing superproject knows about the
>>>        names of (but does not hold copies of) commit objects of the
>>>        contained submodules.
>>
>> That makes sense to point out here. Though should we also introduce
>> "superproject" now?
>
> Yes, that is what I was hinting at.
ok
Previous: Junio C HamanoNext: Stefan Beller
Message 5 of 9 in “glossary: add "remote" and "submodule"”
  1. glossary: add "remote" and "submodule"Stefan Beller, May 27, 2015
  2. Junio C HamanoMay 27, 2015
  3. Stefan BellerMay 27, 2015
  4. Junio C HamanoMay 27, 2015
  5. Stefan BellerMay 27, 2015
  6. glossary: add "remote", "submodule", "superproject"Stefan Beller, May 28, 2015
  7. Junio C HamanoMay 28, 2015
  8. Stefan BellerMay 28, 2015
  9. Junio C HamanoMay 28, 2015

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.