Re: [RFC] git-fetch - repack in the background after fetching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sat, 24 Jun 2006, Martin Langhoff wrote:
>
> Check whether we have a large set of unpacked objects and repack
> after the fetch, but don't for the user to wait for us. Conditional
> on core.autorepack =! no.

I don't think this is safe.

It's also done stupidly.

Instead of askign how many unpacked objects we have with the (expensive) 
git-rev-list, why not just do

	ls "$GIT_DIR/objects/00" | wc -l

which is pretty much guaranteed to be faster and easier.

However, the more worrisome thing about background repacking is that while 
it should be safe against normal users, if you have two _repacks_ at the 
same time, they can decide to remove each others packs. Yeah, yeah, that's 
pretty damn unlikely, but hey, "pretty damn unlikely" is not "impossible".

Also, I think you'd want to repack with "-l", in case the thing is set up 
with an alternate object directory.

			Linus
-
: 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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]