git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-count-objects --all support

From
Junio C Hamano <junkio@cox.net>
Date
Jan 22, 2006, 03:03 UTC
Message-ID
<7v7j8thsl4.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vslrhht8b.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 6 quoted lines
> 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.

Previous: Junio C Hamano
Message 5 of 5 in “git-count-objects --all support”
  1. git-count-objects --all supportPetr Baudis, Jan 22, 2006
  2. Junio C HamanoJan 22, 2006
  3. Petr BaudisJan 22, 2006
  4. Junio C HamanoJan 22, 2006
  5. Junio C HamanoJan 22, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.