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

Re: git help prune accuracy?

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 15, 2011, 22:18 UTC
Message-ID
<7v1us5mqc4.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201112151453.52157.mfick@codeaurora.org>
Martin Fick <mfick@codeaurora.org> writes:
Show 12 quoted lines
>>   objects from the object database. In addition, it
>> prunes the unpacked objects that are also found in packs
>> by running git prune-packed.
>> 
>> The last sentence seems like it should maybe have the
>> following fix:
>> 
>> s/it prunes the unpacked/it prunes the unreferenced/
>
> Ack, I meant:
>
> s/it prunes the unpacked/it prunes the unreachable/

"In addition" part is about objects that exist in loose format that are also found in packs and has nothing to do with reachability.

Running "git pack-objects" to collect loose objects into a new pack will not remove these loose objects that are copied into that new pack. Because we try to access objects from an already open packfile before trying a loose object file, removing these now-redundant loose ones after they are packed makes sense. And that is what "git prune-packed" does.

Previous: Martin FickNext: Martin Fick
Message 3 of 5 in “git help prune accuracy?”
  1. Martin FickDec 15, 2011
  2. Martin FickDec 15, 2011
  3. Junio C HamanoDec 15, 2011
  4. Martin FickDec 15, 2011
  5. Junio C HamanoDec 16, 2011

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.