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

Re: Cleaning up files reported by size-garbage

From
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Date
Aug 27, 2020, 17:36 UTC
Message-ID
<20200827173645.digsnbu3z4donzno@chatter.i7.local>
In-Reply-To
<20200827171954.GA3970312@coredump.intra.peff.net>
On Thu, Aug 27, 2020 at 01:19:54PM -0400, Jeff King wrote:
Show 11 quoted lines
> I think that git-gc will clean them up (via git-prune). It will also
> check that their mtimes are older than the expiration time, which avoids
> accidentally cleaning up the pack for an incoming fetch or push.
> 
> The default gc expiration time is 2 weeks, though, so you might want
> something like:
> 
>   git gc --prune=5.minutes.ago
> 
> if you're trying to get rid of them immediately. Likewise use git-prune
> directly if you don't want to incur the cost of a full gc/repack.

Oh, you're totally right. For some reason I was convinced that git-prune didn't touch them, but I stand corrected.

Thanks for the pointer!
-K
Previous: Jeff King
Message 3 of 3 in “Cleaning up files reported by size-garbage”
  1. Konstantin RyabitsevAug 27, 2020
  2. Jeff KingAug 27, 2020
  3. Konstantin RyabitsevAug 27, 2020

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.