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

Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.

From
Henri GEIST <geist.henri@laposte.net>
Date
Mar 7, 2014, 22:35 UTC
Message-ID
<1394231714.7891.39.camel@Naugrim>
In-Reply-To
<BEB30FB8-204C-4272-8F94-6210D96FB2CB@kellerfarm.com>
Le vendredi 07 mars 2014 à 16:42 -0500, Andrew Keller a écrit :
Show 28 quoted lines
> On Mar 7, 2014, at 2:53 AM, Henri GEIST <geist.henri@laposte.net> wrote:
> 
> > Adding a note in the submodule documentation signaling that the
> > automatically cloned missing submodules are cloned with a separate
> > gitdir. And where it is put.
> > 
> > Signed-off-by: Henri GEIST <geist.henri@laposte.net>
> > ---
> > Documentation/git-submodule.txt |    5 +++++
> > 1 file changed, 5 insertions(+)
> > 
> > diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
> > index 21cb59a..ea837fd 100644
> > --- a/Documentation/git-submodule.txt
> > +++ b/Documentation/git-submodule.txt
> > @@ -64,6 +64,11 @@ using the 'status' subcommand and get a detailed overview of the
> > difference between the index and checkouts using the 'summary'
> > subcommand.
> > 
> > +*NOTE*: when submodule add or submodule update commands clone a missing
> > +submodule, the option --separate-git-dir is passed to the clone command
> > +and the gitdir of the submodule is placed outside of its working
> > +directory in the .git/module of the current repository.
> > +
> 
> The modules directory is 'modules'.  And, the '.git' folder is not always called '.git' -- in a submodule, for example, the directory name is the name of the module.
> 
> Also, this file contains mostly high-level documentation, and this addition feels technical in nature.  Is there a location for more technical documentation?  Or, perhaps it can be reworded to sound less technical?

This information is technical in nature but has some importance for general users. As this kind of clone have a separate gitdir, you will have a surprise if you copy past the worktree as the gitdir will not come together. I have done it and as the doc say nothing about that it take me some time to understand what happened. And why this repository behave differently than others.

May be I can rephrase like this :

*NOTE*: when 'submodule add' or 'submodule update' commands clone a missing submodule, the $GIT_DIR of the submodule containing the metadata is placed outside of its working directory in the $GIT_DIR/modules of the current repository. Those submodule can not directly be copied or move. You need to use 'git clone'.

Show 12 quoted lines
> 
> > 
> > COMMANDS
> > --------
> > -- 
> > 1.7.9.3.369.gd715.dirty
> > 
> > 
> > --
> 
>  - Andrew Keller
> 
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 11 in “Documentation: Say that submodule clones use a separate gitdirs.”
  1. Documentation: Say that submodule clones use a separate gitdirs.Henri GEIST, Mar 7, 2014
  2. Andrew KellerMar 7, 2014
  3. Junio C HamanoMar 7, 2014
  4. Henri GEISTMar 7, 2014
  5. Junio C HamanoMar 7, 2014
  6. Henri GEISTMar 8, 2014
  7. Andrew KellerMar 9, 2014
  8. Henri GEISTMar 10, 2014
  9. Junio C HamanoMar 10, 2014
  10. Henri GEISTMar 10, 2014
  11. Junio C HamanoMar 10, 2014

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.