Re: Re: Re: [ANNOUNCE] git-pasky-0.3

From: Daniel Barkalow
Date: Wed Apr 13 2005 - 12:02:50 EST


On Wed, 13 Apr 2005, Petr Baudis wrote:

> Dear diary, on Wed, Apr 13, 2005 at 11:25:04AM CEST, I got a letter
> where David Woodhouse <dwmw2@xxxxxxxxxxxxx> told me that...
> > On Wed, 2005-04-13 at 10:59 +0200, Petr Baudis wrote:
> > > Theoretically, you are never supposed to share your index if you work
> > > in fully git environment.
> >
> > Maybe -- if we are prepared to propagate the BK myth that network
> > bandwidth and disk space are free.
> >
> > Meanwhile, in the real world, it'd be really useful to support sharing.
>
> It's fine to share the objects database. If you want to share the
> directory cache, you are doing something wrong, though. What do you need
> it for?
>
> > I'd even like to see support for using multiple branches checked out of
> > the same .git/ repository. We already cope with having multiple branches
> > _in_ the repository -- all we need to do is cope with multiple indices
> > too, so we can have different versions checked out.
>
> I'm working on that right now. (Well, I wish I would, if other things
> didn't keep distracting me.)
>
> The idea is to have a command which will do something like:
>
> mkdir .git
> ln -s $origtree/heads $origtree/objects $origtree/tags .git
> cp $origtree/HEAD .git
> cd ..
> read-tree $(tree-id)
>
> Voila. Now you have a new tree with almost no current neither future
> overhead.

For future reference, git is unhappy if you actually do this, because your
HEAD won't match the (empty) contents of the new directory. The easiest
thing is to cp -r your original, replace the shared stuff with links, and
go from there.

-Daniel
*This .sig left intentionally blank*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/