From: Junio C Hamano <gitster@pobox.com>
To: Henri GEIST <geist.henri@laposte.net>
Cc: Andrew Keller <andrew@kellerfarm.com>,
Git List <git@vger.kernel.org>,
Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: [PATCH/RFC] Documentation: Say that submodule clones use a separate gitdirs.
Date: Mon, 10 Mar 2014 12:36:47 -0700 [thread overview]
Message-ID: <xmqqsiqprgkw.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1394475733.7891.53.camel@Naugrim> (Henri GEIST's message of "Mon, 10 Mar 2014 19:22:13 +0100")
Henri GEIST <geist.henri@laposte.net> writes:
> Le lundi 10 mars 2014 à 08:31 -0700, Junio C Hamano a écrit :
> ...
>> This is not limited to submodules. There are multiple lower-level
>> mechanisms for a $path/.git to borrow the repository data from
>> elsewhere outside of $path and a cloned submodule uses only one of
>> them. For any such $path, "cp -R $path $otherplace" will result in
>> an "$otherplace" that does not work as a Git repository in exactly
>> the same way, whether it happens to be a submodule checkout or not.
>>
>> That is why I suggested to enhance description on a more general
>> part of the documentation that covers what a Git repository is.
> ...
> If there is some other situation where this can occur as a side effect
> of a git command it can be good to have the user aware of the list or
> at least inform them in general case a git repository cannot be copied
> in a place every body will see.
> Or place a note in the manpage of every git command which can have this
> side effect.
I think we should do two things:
- In the repository format document, state that there are two
lower-level mechanisms and a half that lets a repository borrow
from somewhere else, and "cp -R" of the former will not result in
a complete, usable repository, and who employs these mechanisms.
* Redirecting the entire .git via the textual gitfile mechanism,
which is used by "clone --separate-git-dir" and "submodule";
* Borrowing .git/objects read-only from elsewhere, overlaying our
own, via .git/objects/info/alternates, which is used by "clone
--reference";
* Redirecting some paths in .git to another, via "git workdir";
soon to be replaced with .git/commondir mechansim.
- In each of the documentation page on an end-user facing command
that will be mentioned above, add "See also" reference to the
above description in the repository format document.
We could elaborate the "See also" as something like "If you use
this feature, do not think you can "cp -R" the repository to
elsewhere and expect the copy to function; see also ...", if we
wanted to.
prev parent reply other threads:[~2014-03-10 19:36 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
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 [this message]
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=xmqqsiqprgkw.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=Jens.Lehmann@web.de \
--cc=andrew@kellerfarm.com \
--cc=geist.henri@laposte.net \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.