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

Re: "git gc" doesn't seem to remove loose objects any more

From
BSBruce Stephens <bruce.stephens@isode.com>
Date
Dec 15, 2008, 14:08 UTC
Message-ID
<80oczdy1iv.fsf@tiny.isode.net>
In-Reply-To
<237967ef0812150538n671c22b8gaf7a7b5dcaf68433@mail.gmail.com>
"Mikael Magnusson" <mikachu@gmail.com> writes:
[...]
> IIRC git gc only removes loose objects older than two weeks, if you
> really want to remove them now, run git prune. But make sure no other
> git process can be active when you run it, or it could possibly step
> on something.

OK, that makes sense. Obviously I misunderstood this. That doesn't explain why the number of objects might increase after "git gc", but perhaps that's for a good reason too.

Surely "git gui"'s warning is unhelpful, then: it warns I have more than 2000 loose objects (in another checkout), offers to compress my database, and I end up with an unchanged repository (which it still complains about)? Is this warning just redundant now that we've got "git gc --auto"?

Previous: Mikael MagnussonNext: Björn Steinbrink
Message 3 of 12 in “"git gc" doesn't seem to remove loose objects any more”
  1. Bruce StephensDec 15, 2008
  2. Mikael MagnussonDec 15, 2008
  3. Bruce StephensDec 15, 2008
  4. Björn SteinbrinkDec 15, 2008
  5. Theodore TsoDec 15, 2008
  6. Mark BrownDec 15, 2008
  7. Johan HerlandDec 15, 2008
  8. Mikael MagnussonDec 15, 2008
  9. Jakub NarebskiDec 15, 2008
  10. Theodore TsoDec 15, 2008
  11. Brandon CaseyDec 15, 2008
  12. objects to be pruned immediately don't have to be loosenedNicolas Pitre, Dec 15, 2008

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.