Re: .gitlink for Summer of Code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 26 March 2007, Martin Waitz wrote:
> hoi :)
> 
> On Mon, Mar 26, 2007 at 10:38:08AM -0700, Eric Lesh wrote:
> > > Light checkouts would have an almost empty .git (it still needs an
> > > index, and its own head anyway) and use the .git of the main repo for
> > > everything else.
> > > 
> > 
> > Josef Weidendorfer tried to implement this before, and he concluded that
> > having a _text file_ .git, instead of a directory, would be a good way
> > to distinguish .gitlinked checkouts from normal checkouts.
> 
> but that does not allow for per-checkout HEAD and index.
> I don't see any reason for providing any sort for "gitlink" which
> also uses HEAD and index from the linked location -- then you could
> use a simple symlink, too.

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).

> 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.

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.

Hmm... the "almost empty .git directory" has its merits.
You can override config options, and of course, the "base" for the
lightweight checkout still can be a full .git dir, as would be needed
for submodule support. In fact, you have more freedom to choose the
path to the base gitdir.
I like it ;-)

So this changes the .gitlink proposal to:
* smartly reset GIT_DIR when a core.link option is set in .git/config
  (and set GIT_WORK_DIR accordingly)
* fake a core.name if not set (this comes from the original proposal
  to get an automatic identifier of a submodule checkout by its
  relative path to the supermodule)
* git-checkout to allow to create a fresh light-weight checkout

Josef
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]