From: Junio C Hamano Date: Sun, 22 Jan 2006 03:03:35 GMT Subject: Re: [PATCH] git-count-objects --all support Message-ID: <7v7j8thsl4.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <7vslrhht8b.fsf@assigned-by-dhcp.cox.net> Junio C Hamano writes: > The point of counting objects is to see if it is time to repack, > so the warning is something I am quite hesitant to accept, even > with a suppression option. The other way around is probably OK > ("please warn me if I have packs"), but feels somewhat pointless. > > The --all option might be a welcome addition, though. I think your patch counts the same object twice if it is packed in more than one packs and/or it has a loose copy _and_ also in a pack. If it is a good thing or not is totally up to the reason why we are counting. We might be better off if we did this kind of additions by building on fsck-objects. For example, you could give a --stat option that might say something like this: $ git fsck-objects --full --stat commit 2488 tree 43343 blob 212234 total 258065 packed 184382 loose 78115 dups 4432 where "dups" is number of duplicated copies --- an object packed in more than two packs, or appearing in a pack and also having a loose copy. I dunno.