On Tue, Feb 8, 2011 at 5:47 PM, Marc Guenther <y...@schli.ch> wrote:
> Well, from what I understand, if you have an alternates file in repo2, which 
> points to repo1, than a "git gc" in repo2 will remove all object files which 
> also exist in repo1. This would solve the problem in this particular 
> situation. You could do this by using git clone -s ... when creating the 
> clone.
>
> The downside of this is, that now repo2 is dependant on repo1, so you cannot 
> delete repo1 without first regenerating all the objects in repo2 (using 
> something like git repack -ad). And the repo1 does not know which other repos 
> are dependant on it, so that information has to be stored somewhere else.

Thanks for the insight! I remember we discussed using alternates in
Gitorious about two years ago, but I didn't remember why we ended up
not doing so - I guess this explains it.

All repositories that have been cloned through Gitorious will keep a
relation to its "parent" in the database, so on the "model level" we
should be able to keep track of the relationship between a "parent"
and a "child" repository. The issue here is that parents can be
deleted, in which case the relationship will be "nullified" - the
relation disappears.

My colleague Christian is working on a new feature in Gitorious:
promoting another repository to be a "mainline". His work is in this
reassign_mainline branch:
http://gitorious.org/~cjohansen/gitorious/cjohansens-mainline/commits/reassign_mainline
. This feature is intended to help people who have started a
repository and want to step down as maintainers: they will be able to
pick one of the clones of his repository and make this the new parent.
One thing we could do is to prevent users from removing repositories
that have clones/children and rather encourage using the promote
feature instead.

If we choose to do so, we could take care of the alternates in that
process. I suspect, however, that updating
$GITDIR/objects/info/alternates to point to the new parent will not be
sufficient - but maybe if we do a repack on the new parent first?

Cheers,
- Marius

-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

Reply via email to