From: Junio C Hamano <junkio@cox.net>
To: skimo@liacs.nl
Cc: Jan Hudec <bulb@ucw.cz>, Alex Riesen <raa.lkml@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 07/16] git-read-tree: take --submodules option
Date: Mon, 21 May 2007 12:01:43 -0700 [thread overview]
Message-ID: <7vr6pac86g.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20070521180506.GP942MdfPADPa@greensroom.kotnet.org> (Sven Verdoolaege's message of "Mon, 21 May 2007 20:05:06 +0200")
Sven Verdoolaege <skimo@kotnet.org> writes:
> On Mon, May 21, 2007 at 06:59:38PM +0200, Jan Hudec wrote:
>> We could store the GIT_DIR of submodule within the GIT_DIR of the
>> superproject instead of the submodule directory itself. So instead of:
>> /
>> /.git
>> /subdir
>> /subdir/.git
>>
>> There would be:
>> /
>> /.git
>> /subdir
>> /.git/submodules/submodule-name.git
>
> I have this already, except that I use /.git/submodules/submodule-name/.git
> because I was too lazy to figure out how to get clone to use the above
> without using --bare, because --bare disables separate-remotes.
>
> Is there any good reason, btw for --bare not to do separate-remotes ?
Traditinoally, the purpose of --bare is to set up distribution
points, either CVS style "shared public repository that
everybody pushes into and fetches from", or "owned by me and I
push my change into it to publish". In either case, there is no
point of even having an upstream in such a repository, let
alone refs/remotes/origin/ hierarchy.
So that's the "good reason" part.
Having said that, last night I was thinking about making the
layout after a clone a bit more flexible and orthogonal to
existence of working tree. What got me thinking about it was
different from your motivation, though.
If you have an ordinary working tree, and if you want to have a
clone of that working tree that you can work in, independently
(i.e. not treating the repository you cloned from any specially
from other repositories by marking it "origin"), currently there
is no straightforward way to do so, other than doing
something like:
(1) do a --bare clone, which would create "project.git";
(2) mkdir "project" && mv "project.git" "project/.git";
(3) edit "project/.git/config" and mark it as a non-bare
repository.
(4) "git checkout -f HEAD".
I'd call this a "pure" clone. It is as close as the original
repository you would get without copying other per-repository
data such as .git/info, .git/config, so that you can start using
it as an _independent _repository. It is like a --bare clone
but with a working tree associated with it.
What you want is probably the opposite. A bare, but non-pure
clone. By non-pure, what I mean is:
(1) it has an upstream ("origin"), hence
(2) it has refs/remotes/origin, and "remotes.origin.*"
If the word "non-pure" has a negative connotation, you could
call it "a follower repository".
In short, the current behaviour of --bare is "bare and pure",
and clone without --bare is "not bare, and a follower". What I
wanted was "not bare, but pure", and I think what you want is
"bare, but a follower".
next prev parent reply other threads:[~2007-05-21 19:01 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-18 19:24 Second round of support for cloning submodules skimo
2007-05-18 19:24 ` [PATCH 01/16] Add dump-config skimo
2007-05-18 19:24 ` [PATCH 02/16] git-config: add --remote option for reading config from remote repo skimo
2007-05-18 19:24 ` [PATCH 03/16] http.h: make fill_active_slots a function pointer skimo
2007-05-18 19:24 ` [PATCH 04/16] git-config: read remote config files over HTTP skimo
2007-05-18 19:24 ` [PATCH 05/16] unpack-trees.c: verify_uptodate: remove dead code skimo
2007-05-18 22:33 ` Junio C Hamano
2007-05-18 19:24 ` [PATCH 06/16] unpack-trees.c: pass cache_entry * to verify_absent rather than just the name skimo
2007-05-18 19:24 ` [PATCH 07/16] git-read-tree: take --submodules option skimo
2007-05-18 21:53 ` Alex Riesen
2007-05-18 22:08 ` Sven Verdoolaege
2007-05-18 22:42 ` Alex Riesen
2007-05-19 3:59 ` Junio C Hamano
2007-05-19 4:27 ` Shawn O. Pearce
2007-05-19 9:19 ` Alex Riesen
2007-05-19 13:05 ` Sven Verdoolaege
2007-05-19 18:20 ` Junio C Hamano
2007-05-20 15:54 ` Jan Hudec
2007-05-20 18:33 ` Junio C Hamano
2007-05-20 20:22 ` Sven Verdoolaege
2007-05-21 16:59 ` Jan Hudec
2007-05-21 18:05 ` Sven Verdoolaege
2007-05-21 19:01 ` Junio C Hamano [this message]
2007-05-21 20:02 ` Jan Hudec
2007-05-21 21:11 ` Martin Waitz
2007-05-22 19:37 ` Jan Hudec
2007-05-24 15:48 ` Martin Waitz
2007-05-25 10:06 ` Jakub Narebski
2007-05-25 20:15 ` Jan Hudec
2007-05-24 18:26 ` Junio C Hamano
2007-05-24 18:45 ` Sven Verdoolaege
2007-05-24 18:58 ` Junio C Hamano
2007-05-24 19:14 ` Sven Verdoolaege
2007-05-24 20:32 ` Junio C Hamano
2007-05-24 20:55 ` Petr Baudis
2007-05-24 20:59 ` Junio C Hamano
2007-05-24 19:43 ` Junio C Hamano
2007-05-24 20:57 ` Petr Baudis
2007-05-25 20:35 ` Jan Hudec
2007-05-25 21:05 ` Junio C Hamano
2007-05-25 21:16 ` Steven Grimm
2007-05-25 22:11 ` Junio C Hamano
2007-05-19 0:34 ` Petr Baudis
2007-05-18 19:24 ` [PATCH 08/16] unpack-trees.c: assume submodules are clean skimo
2007-05-18 19:24 ` [PATCH 09/16] entry.c: optionally checkout submodules skimo
2007-05-18 21:56 ` Alex Riesen
2007-05-18 22:03 ` Sven Verdoolaege
2007-05-18 22:33 ` Alex Riesen
2007-05-18 22:00 ` Alex Riesen
2007-05-18 22:20 ` [PATCH] Add run_command_v_opt_cd: chdir into a directory before exec Alex Riesen
2007-05-18 22:48 ` [PATCH] Use run_command_v_opt_cd when checking out a submodule Alex Riesen
2007-05-18 19:24 ` [PATCH 10/16] git-checkout: pass --submodules option to git-read-tree skimo
2007-05-19 0:36 ` Petr Baudis
2007-05-18 19:25 ` [PATCH 11/16] git-fetch: skip empty arguments skimo
2007-05-18 22:33 ` Junio C Hamano
2007-05-18 19:25 ` [PATCH 12/16] builtin-fetch--tool: extend "native-store" for use in cloning skimo
2007-05-18 22:52 ` Alex Riesen
2007-05-19 12:17 ` Sven Verdoolaege
2007-05-18 19:25 ` [PATCH 13/16] git-clone: rely on git-fetch for fetching for most protocols skimo
2007-05-18 19:25 ` [PATCH 14/16] git-clone: rely on git-fetch for non-bare fetching over http skimo
2007-05-18 19:25 ` [PATCH 15/16] git-read-tree: treat null commit as empty tree skimo
2007-05-18 19:25 ` [PATCH 16/16] git-clone: add --submodules for cloning submodules skimo
2007-05-18 19:34 ` Second round of support " Sven Verdoolaege
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=7vr6pac86g.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=bulb@ucw.cz \
--cc=git@vger.kernel.org \
--cc=raa.lkml@gmail.com \
--cc=skimo@liacs.nl \
/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).