Lars Hjemli wrote: > On 10/10/07, J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote: >> On Wed, Oct 10, 2007 at 06:30:02PM -0300, Han-Wen Nienhuys wrote: >>> could it be that GC does not handle cyclic alternates correctly? >> Does it handle alternates at all? If you run git-gc on a repository >> which other repositories get objects from, then my impression was that >> bad things happen. >> > > AFAIK 'git gc' is safe, while 'git gc --prune' will remove loose > (unreferenced) objects. No, this is not the case, unless something has changed very recently in git-gc or git-repack. Even git-gc with no arguments is unsafe if the repository being gc'ed is listed in another's alternates. git-gc calls repack with -a and -d. which causes a new pack to be created which only contains the objects required by the local repository. The other packs are then deleted. Objects contained in those packs and required by a "sharing" repository (one using the alternates mechanism) will be deleted if the local repository no longer references them. Maybe git-gc should make use of repack's new -A option by default and only use -a (and not -A) when --prune is specified... -brandon - 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