From: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
To: Martin Waitz <tali@admingilde.org>
Cc: Eric Lesh <eclesh@ucla.edu>, Matthieu Moy <Matthieu.Moy@imag.fr>,
git@vger.kernel.org
Subject: Re: .gitlink for Summer of Code
Date: Tue, 27 Mar 2007 01:00:12 +0200 [thread overview]
Message-ID: <200703270100.12920.Josef.Weidendorfer@gmx.de> (raw)
In-Reply-To: <20070326220302.GH22773@admingilde.org>
On Tuesday 27 March 2007, Martin Waitz wrote:
> On Mon, Mar 26, 2007 at 09:33:44PM +0200, Josef Weidendorfer wrote:
> > The idea was to make this a possible building block for submodules.
> > A simple symlink does not work there when you want the checkout to
> > work even after moving the whole checkout directory around (e.g. to move the
> > submodule around inside of the superproject).
>
> Well the submodule use case is a bit different than the lightweight
> checkout.
> When you store the submodule object database inside the supermodule then
> you only need to store the position of the submodule relative to its
> supermodule. As you wrote this is neccessary in order to find the part
> of the object database which belongs to this one submodule.
Where do you store this in your module3 branch?
> Finding the supermodule repository is obviously not difficult, only
> finding the right part of it.
> But for lightweight checkouts you need something which is closer to a
> symlink.
Yes, of course.
> > > So having an almost empty .git directory
> > > and reusing parts from another .git directory makes a lot of sense to
> > > me.
> >
> > This would work. However, you can not clone from an almost empty .git
> > directory with current git.
>
> You can't clone from a .gitlink with current git, eighter ;-).
> But if you e.g. set git_dir according to your link then everything
> should work quite easily.
Yes.
> > The original proposal was to have a standard .git directory for every
> > light-weight checkout inside of the base .git directory, e.g.
> > in <base>/.git/ext/<name>.git where <name> is some identifier for the
> > lightweight checkout, either provided in the .gitlink file or
> > automatically determined.
>
> What would you store in these per-checkout directories?
> The index and HEAD? Anything more?
To make it easy to implement, I thought about a standard .git layout,
with most directories being symlinks.
> For submodules I currently use <parent>/.git/objects/module/<submodule>/
> to store the objects belonging to the submodule.
> Perhaps it makes sense to extend this to a full .git directory per
> submodule, I'm not yet decided on that.
IMHO this would be a nice property. As the submodule could exist independently
with its own remote heads/tags, you probably would want to at least track these,
even if it is a submodule in your superproject.
And then it makes sense to move it directly to .git/module/...
There also was a use case where one library project is used in >10
superprojects. It would be nice to be able to make the submodule git dir
be outside of the supermodules git dir. However, this also can be done
with symlinks without any special support (aside from sharing the
head namespace).
Josef
> For submodules the object store has to be different, but for normal
> lightweight checkout this should of course be shared.
next prev parent reply other threads:[~2007-03-26 22:48 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-25 12:30 .gitlink for Summer of Code Eric Lesh
2007-03-25 15:20 ` Matthieu Moy
2007-03-25 20:39 ` Shawn O. Pearce
2007-03-25 20:54 ` Johannes Schindelin
2007-03-25 21:03 ` Shawn O. Pearce
2007-03-25 20:55 ` Junio C Hamano
2007-03-25 21:05 ` Shawn O. Pearce
2007-03-27 3:40 ` Petr Baudis
2007-03-26 17:16 ` Eric Lesh
2007-03-26 17:22 ` Matthieu Moy
2007-03-26 17:38 ` Eric Lesh
2007-03-26 18:35 ` Martin Waitz
2007-03-26 19:33 ` Josef Weidendorfer
2007-03-26 19:49 ` Matthieu Moy
2007-03-26 23:14 ` Josef Weidendorfer
2007-03-27 16:59 ` Matthieu Moy
2007-03-26 22:03 ` Martin Waitz
2007-03-26 22:51 ` Junio C Hamano
2007-03-26 23:16 ` Submodule object store Martin Waitz
2007-03-26 23:28 ` Junio C Hamano
2007-03-26 23:36 ` Martin Waitz
2007-03-26 23:20 ` David Lang
2007-03-26 23:55 ` Martin Waitz
2007-03-26 23:40 ` David Lang
2007-03-27 15:25 ` Martin Waitz
2007-03-27 16:53 ` David Lang
2007-03-27 0:29 ` Junio C Hamano
2007-03-27 14:28 ` Martin Waitz
2007-03-27 11:25 ` Uwe Kleine-König
2007-03-27 11:50 ` Uwe Kleine-König
2007-03-27 15:53 ` Martin Waitz
2007-03-27 16:56 ` Josef Weidendorfer
2007-03-27 16:44 ` Martin Waitz
2007-03-27 17:22 ` Uwe Kleine-König
2007-03-27 18:41 ` Linus Torvalds
2007-03-27 19:42 ` Uwe Kleine-König
2007-03-27 19:53 ` Linus Torvalds
2007-03-27 19:59 ` Linus Torvalds
2007-03-27 15:46 ` Martin Waitz
2007-03-26 23:17 ` .gitlink for Summer of Code Josef Weidendorfer
[not found] ` <Pine.LNX.4.64.0703270952020. 6730@woody.linux-foundation.org>
2007-03-26 23:24 ` Junio C Hamano
2007-03-27 17:04 ` Linus Torvalds
2007-03-27 17:00 ` David Lang
2007-03-27 18:15 ` Linus Torvalds
2007-03-27 17:35 ` Martin Waitz
2007-03-27 18:09 ` Daniel Barkalow
2007-03-27 18:19 ` Linus Torvalds
2007-03-27 20:54 ` Daniel Barkalow
2007-03-27 21:11 ` Linus Torvalds
2007-03-27 20:54 ` David Lang
2007-03-27 23:31 ` Jakub Narebski
2007-03-27 23:20 ` David Lang
2007-03-27 18:36 ` Steven Grimm
2007-03-27 20:02 ` Daniel Barkalow
2007-03-27 21:27 ` Linus Torvalds
2007-03-26 23:00 ` Josef Weidendorfer [this message]
2007-03-26 23:27 ` Martin Waitz
2007-03-26 17:31 ` Jakub Narebski
2007-03-26 18:21 ` Matthieu Moy
2007-03-27 0:48 ` Jakub Narebski
2007-03-25 20:46 ` Shawn O. Pearce
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=200703270100.12920.Josef.Weidendorfer@gmx.de \
--to=josef.weidendorfer@gmx.de \
--cc=Matthieu.Moy@imag.fr \
--cc=eclesh@ucla.edu \
--cc=git@vger.kernel.org \
--cc=tali@admingilde.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 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).