git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henri GEIST <geist.henri@laposte.net>
To: Andrew Keller <andrew@kellerfarm.com>
Cc: Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.
Date: Fri, 07 Mar 2014 23:35:14 +0100	[thread overview]
Message-ID: <1394231714.7891.39.camel@Naugrim> (raw)
In-Reply-To: <BEB30FB8-204C-4272-8F94-6210D96FB2CB@kellerfarm.com>

[-- Attachment #1: Type: text/plain, Size: 2444 bytes --]

Le vendredi 07 mars 2014 à 16:42 -0500, Andrew Keller a écrit :
> 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'.


> 
> > 
> > COMMANDS
> > --------
> > -- 
> > 1.7.9.3.369.gd715.dirty
> > 
> > 
> > --
> 
>  - Andrew Keller
> 



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

  parent reply	other threads:[~2014-03-07 22:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07  7:53 [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs Henri GEIST
2014-03-07 21:42 ` Andrew Keller
2014-03-07 22:19   ` Junio C Hamano
2014-03-07 22:35   ` Henri GEIST [this message]
2014-03-07 23:37     ` Junio C Hamano
2014-03-08  0:50       ` Henri GEIST
2014-03-09 23:24         ` Andrew Keller
2014-03-10  7:52           ` Henri GEIST
2014-03-10 15:31           ` Junio C Hamano
2014-03-10 18:22             ` Henri GEIST
2014-03-10 19:36               ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1394231714.7891.39.camel@Naugrim \
    --to=geist.henri@laposte.net \
    --cc=Jens.Lehmann@web.de \
    --cc=andrew@kellerfarm.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).