From: Henri GEIST <geist.henri@laposte.net>
To: Junio C Hamano <gitster@pobox.com>
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 19:22:13 +0100 [thread overview]
Message-ID: <1394475733.7891.53.camel@Naugrim> (raw)
In-Reply-To: <xmqq61nmrrxe.fsf@gitster.dls.corp.google.com>
[-- Attachment #1: Type: text/plain, Size: 2447 bytes --]
Le lundi 10 mars 2014 à 08:31 -0700, Junio C Hamano a écrit :
> Andrew Keller <andrew@kellerfarm.com> writes:
>
> > On Mar 7, 2014, at 7:50 PM, Henri GEIST wrote:
> > ...
> >> To give one of my project to someone else I have copied it on a USB key.
> >> By a simple drag and drop with the mouse.
> >> And I am quite sure I am not alone doing this way.
> >>
> >> I have done those kind of things lot of time without any problem.
> >> But that day 'the_project' happened to be a submodule cloned by
> >> 'git submodule update' then on the USB key the $GIT_DIR of 'the_project'
> >> was missing.
> >>
> >> If 'man git-submodule' have made me aware of the particularities of submodules
> >> clone I had write in a terminal:
> >>
> >> git clone the_project /media/usb/the_project
> >>
> >> Or at least I had understand what happened quicker.
> >>
> >> I have nothing against also adding something in repository-layout but I am
> >> pretty sure normal users never read repository-layout as it is not a command
> >> they use. And it is not mentioned in most tutorials.
> >
> > How about something like this:
> >
> > "The git directory of a submodule lives inside the git directory of the parent repository instead of within the working directory."
> >
> > I'm not sure where to put it, though.
>
> 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.
You are entirely right.
My view of the situation was biased by the fact that submodule cloning
is the only case I am aware of except when the user manually type
'--separate-git-dir' where this problem could occur.
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.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 230 bytes --]
next prev parent reply other threads:[~2014-03-10 18:22 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 [this message]
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=1394475733.7891.53.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).