Re: git prune pig slow

From: Linus Torvalds <torvalds@osdl.org>
Date: 2006-07-30 04:14:02
On Sat, 29 Jul 2006, Russell King wrote:
> 
> I killed it after 10 minutes and decided to do the job manually -
> git-fsck-objects --unreachable and deleting the objects one by one is
> _much_ quicker than git-fsck-objects --full --cache --unreachable.

It's also very dangerous.

If you have partial packing (which you can get if you fetch data using 
rsync or http, for example), not havign the "--full" means that 
git-fsck-objects will report on objects being "unreachable" if they are 
only reachable from another object that is packed.

Now, in practice, if you only use the git native protocol, this should 
never happen, and you're fine. But there's a _very_ real reason why "git 
prune" passes the "--full" flag to git-fsck-cache. "git prune" is simply 
too dangerous without it.

That said, the current "git prune" in 1.4.2-rc is much faster, because it 
does the reachability analysis on its own, and doesn't do all the other 
things that git-fsck-cache does.

Btw, another alternative to "git prune" is actually to do

	git repack -a -d

and then just delete all unpacked objects.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sun Jul 30 04:15:20 2006

This archive was generated by hypermail 2.1.8 : 2006-07-30 04:15:49 EST