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

Re: [PATCHv2] submodules: overhaul documentation

From
Stefan Beller <sbeller@google.com>
Date
Jun 21, 2017, 17:25 UTC
Message-ID
<CAGZ79kYbjYyFk5-z+68iUqM=U8dgnDEzReS9aTshXb97Co+RqQ@mail.gmail.com>
In-Reply-To
<CAGf8dg+f-RzcT15zofB9xbgEE6nTK+T7awjOHY+KEx7KZ-cPXg@mail.gmail.com>
On Tue, Jun 20, 2017 at 8:45 PM, Jonathan Tan <jonathantanmy@google.com> wrote:
Show 21 quoted lines
> Thanks, this looks like a good explanation. Some more nits, but
> overall I feel like I understand this and have learned something from
> it.
>
> On Tue, Jun 20, 2017 at 3:56 PM, Stefan Beller <sbeller@google.com> wrote:
>> +A submodule is another Git repository tracked inside a repository.
>> +The tracked repository has its own history, which does not
>> +interfere with the history of the current repository.
>> +
>> +It consists of a tracking subdirectory in the working directory,
>> +a 'gitlink' in the working tree and an entry in the `.gitmodules`
>
> Probably should be `gitlink` (the special quotes), and (optional)
> s/`gitlink`/`gitlink` object/ because it might not be apparent that
> gitlink is a type of object.
>
>> +file (see linkgit:gitmodules[5]) at the root of the source tree.
>
> After reading below, maybe we should mention the Git directory in
> $GIT_DIR/modules/<submodule name> as part of what a submodule consists
> of too.

I implemented the rest of the suggestions, but this one leaves my head scratching. It's not as if we don't know what a submodule is already. Our glossary says:

    submodule
           A repository that holds the history of a separate project inside
           another repository (the latter of which is called superproject).

So by that definition the gitlink and the entry in .gitmodules are just metadata by the superproject and the actual submodule is the repository consisting of its working tree (inside the superprojects working tree) as well as its git directory preferably inside the superprojects git dir.

This definition however is broken IMHO, as when there is proper meta data (gitlink + .gitmodules entry), you can have an "uninitialized" submodule, which has neither a working tree nor a git dir at the time.

The wording above holds true for un-{initialized,populated} submodules as well, as the tracking directory is empty and the git dir doesn't exist.

So I think I'll resend without that change.

Thanks, Stefan

Previous: Jonathan TanNext: Brandon Williams
Message 10 of 17 in “submodules: overhaul documentation”
  1. submodules: overhaul documentationStefan Beller, Jun 7, 2017
  2. Junio C HamanoJun 13, 2017
  3. Stefan BellerJun 13, 2017
  4. Brandon WilliamsJun 19, 2017
  5. Stefan BellerJun 20, 2017
  6. Jonathan TanJun 20, 2017
  7. Stefan BellerJun 20, 2017
  8. [PATCHv2] submodules: overhaul documentationStefan Beller, Jun 20, 2017
  9. Jonathan TanJun 21, 2017
  10. Stefan BellerJun 21, 2017
  11. Brandon WilliamsJun 22, 2017
  12. Stefan BellerJun 22, 2017
  13. Junio C HamanoJun 22, 2017
  14. Stefan BellerJun 22, 2017
  15. Brandon WilliamsJun 22, 2017
  16. Stefan BellerJun 22, 2017
  17. [PATCHv3] submodules: overhaul documentationStefan Beller, Jun 22, 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.