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

Re: [PATCH 2/3] Add gitmodules(5)

From
LHLars Hjemli <hjemli@gmail.com>
Date
Jun 10, 2007, 08:58 UTC
Message-ID
<8c5c35580706100158n7dabfce4y5f79f8943d8abb87@mail.gmail.com>
In-Reply-To
<20070610002802.GD31707@planck.djpig.de>
On 6/10/07, Frank Lichtenheld <frank@lichtenheld.de> wrote:
> The unofficial git documentation nitpicker at work ;)
That's good, keep it up :)
Show 6 quoted lines
>
> On Sat, Jun 09, 2007 at 11:38:51PM +0200, Lars Hjemli wrote:
> > +The `.gitmodules` file, located in the top-level directory of a
> > +gitlink:git[7] working tree, is a text file with a layout matching the
>
> That link seems superfluous to me.

Yeah, what I really wanted here was a link to the definition of "git working tree". I'll drop it.

> I would have used "syntax" instead of "layout".
Agreed
Show 12 quoted lines
>
> > +requirements of gitlink:git-config[1].
> > +
> > +The file consists of sections named `module`, divided into one subsection
> > +per submodule. The subsections are named with the logical name of the
> > +submodule it describes.
>
> "sections named module" sounds confusing to me. Why are there multiple
> sections named module? (for the record: I know what you mean, I just
> don't know if it couldn't be said simpler)
> Maybe better "subsections of section `module`, one per submodule"?
> Hmm, sounds ugly too.
Good documentation is hard, so I'll work on it some more...
Show 11 quoted lines
>
> > +Each submodule can contain the following keys.
> > +
> > +module.$name.path::
> > +     Define a path, relative to the top-level directory of the git
> > +     working tree, where the submodule is expected to be checked out.
> > +
> > +module.$name.url::
> > +     Define a url from where the submodule repository can be cloned.
>
> For .path a "Defaults to name of submodule" probably wouldn't hurt.

True. But there might be some issues with this rule, so I'll leave it as is for now.

Show 7 quoted lines
>
> For the sake of documentation consistency I would suggest
> module.<name>.path. You can compare the output of
> $ grep "\.<[a-z]" Documentation/*.txt
> with
> $ grep "\.\$[a-z]" Documentation/*.txt
> to see what I mean.
That was very descriptive, thanks!
Show 10 quoted lines
>
> > +     [module 'libfoo']
> > +             path = include/foo
> > +             url = git://example1.com/git/libfoo.git
> > +
> > +     [module 'libbar']
> > +             url = git://example2.com/pub/git/libbar.git
>
> This would actually be a syntax error in a git config file
> (subsection names can be enclosed in "" but not '').
Shame on me for drinking while documenting ;-)
Thanks for the review, I'll try to send a fixed-up patch later today.

-- larsh

Previous: Frank LichtenheldNext: Johannes Schindelin
Message 10 of 29 in “submodule improvements”
  1. 0/3 submodule improvementsLars Hjemli, Jun 9, 2007
  2. 1/3 git-submodule: allow submodule name and path to differLars Hjemli, Jun 9, 2007
  3. Junio C HamanoJun 10, 2007
  4. Johannes SchindelinJun 10, 2007
  5. Junio C HamanoJun 10, 2007
  6. Lars HjemliJun 10, 2007
  7. Lars HjemliJun 10, 2007
  8. 2/3 Add gitmodules(5)Lars Hjemli, Jun 9, 2007
  9. Frank LichtenheldJun 10, 2007
  10. Lars HjemliJun 10, 2007
  11. Johannes SchindelinJun 10, 2007
  12. Lars HjemliJun 10, 2007
  13. Sven VerdoolaegeJun 10, 2007
  14. Lars HjemliJun 10, 2007
  15. Sven VerdoolaegeJun 10, 2007
  16. Lars HjemliJun 10, 2007
  17. Junio C HamanoJun 10, 2007
  18. Lars HjemliJun 10, 2007
  19. Sven VerdoolaegeJun 11, 2007
  20. Lars HjemliJun 11, 2007
  21. Sven VerdoolaegeJun 11, 2007
  22. Junio C HamanoJun 11, 2007
  23. Matthias LederhoferJun 13, 2007
  24. Lars HjemliJun 13, 2007
  25. Matthias LederhoferJun 13, 2007
  26. Lars HjemliJun 13, 2007
  27. Junio C HamanoJun 13, 2007
  28. gitmodules(5): remove leading period from synopsisLars Hjemli, Jun 13, 2007
  29. 3/3 t7400: barf if git-submodule removes or replaces a fileLars Hjemli, Jun 9, 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.