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

Re: Question about git-prune

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 30, 2007, 20:12 UTC
Message-ID
<7vps3db3rc.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<f66d3l$sa6$1@sea.gmane.org>
walt <wa1ter@myrealbox.com> writes:
>> Probably the objects were packed.
>
> I also tried git-prune-packed, which also did nothing AFAICT.

Of course it wouldn't; prune-packed is to prune loose objects that also appear in packs.

What is happening is:
 - You create a pack that has everything reachable from refs at
   one point;
 - You pull or do your own development; the set of objects
   reachable from refs change from the above set.  This set is
   superset of the above only if there is no rewind is
   involved.  Otherwise, some objects already packed in the
   previous step are now unreachable.
 - git-prune and git-prune-packed are about removing loose
   objects.  They never go into existing packs and eradicate
   objects from them.

When you have unreachable cruft in packs, repacking is the only way to rid them ("git repack -a -d", which is run by "git gc").

Previous: waltNext: Johannes Schindelin
Message 4 of 5 in “Question about git-prune”
  1. waltJun 30, 2007
  2. Johannes SchindelinJun 30, 2007
  3. waltJun 30, 2007
  4. Junio C HamanoJun 30, 2007
  5. Johannes SchindelinJun 30, 2007

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.