Re: git branch performance problem?
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 10, 2007, 21:53 UTC
- Message-ID
- <Pine.LNX.4.64.0710102251230.4174@racer.site>
- In-Reply-To
- <f329bf540710101449oad9c9dg85f3821f55fb85ea@mail.gmail.com>
Hi,
On Wed, 10 Oct 2007, Han-Wen Nienhuys wrote:
Show 19 quoted lines
> 2007/10/10, Lars Hjemli <hjemli@gmail.com>: > > On 10/10/07, J. Bruce Fields <bfields@fieldses.org> 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. > > Yes, I think that in this case, gc --prune was run accidentally, but > given that the history of the program invoking git just died, I'm not > sure how to figure that out. > > Maybe gc --prune could follow the alternates and abort if a cycle was > detected?
I think we talked about this quite some time ago, and the resolution was that it is too hard.
Now that it bit somebody in real life, I think we have to try harder.
And probably the best place to check would be git-prune, not git-gc, since that is the program (called by gc) that most probably killed your repo.
Come to think of it, it should probably be part of git-repack, too.
Will try to cobble up a patch, Dscho