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

Re: [PATCH] gc: call "prune --expire 2.weeks.ago"

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 12, 2008, 10:57 UTC
Message-ID
<alpine.LSU.1.00.0803121153160.1656@racer.site>
In-Reply-To
<7vbq5k77z0.fsf@gitster.siamese.dyndns.org>
Hi,
On Tue, 11 Mar 2008, Junio C Hamano wrote:
Show 25 quoted lines
> Nicolas Pitre <nico@cam.org> writes:
> 
> >> Can we also have "why this is a good idea", "what problem this 
> >> solves"?
> >
> > FWIW, my agreeing with the "why this is a good idea" can be translated 
> > into:
> >
> > Acked-by: Nicolas Pitre <nico@cam.org>
> 
> Hmmm.  Is it _that_ obvious?
> 
> At least it would be easier to readers if we had something like this in 
> the documentation (and/or the commit message):
> 
>     "git gc" used to never prune unreachable objects without being
>     explicitly told to, with its --prune option.  This left cruft to
>     accumulate; the user eventually has to run "git prune" manually.
> 
>     It is safe to prune old objects that are unreachable from refs nor
>     reflogs.  "git gc" is updated to run "git prune --expire 2.weeks.ago"
>     so that users has to run "git prune" by hand much less often.
> 
> Is it too much to ask for regulars to set the example of justifying why 
> each of the change is a good idea?
I would have written something like
	Earlier, git-gc would not prune loose objects without being called 
	with --prune.  However, users were actively warned that it is not 
	a safe operation, so most users never called it.
	This makes the operation reasonably safe (unless you have critical 
	git operations running for over two weeks), by pruning only those 
	objects that are old (in the sense of git operations, which 
	typically take no more than a few seconds).

However, I think that it should have been obvious to those who know the internals of git-gc, and it is completely uninteresting to those that are just users. All they will realise (or not) is that "git gc --auto" now less often complains about too many loose objects (hopefully).

The real question I asked was: is 2 weeks a sensible default? As I said, I was almost tempted to reduce it to 3 days.

Hmm?

Ciao, Dscho

Previous: Junio C HamanoNext: Nicolas Pitre
Message 5 of 41 in “gc: call "prune --expire 2.weeks.ago"”
  1. gc: call "prune --expire 2.weeks.ago"Johannes Schindelin, Mar 11, 2008
  2. Junio C HamanoMar 12, 2008
  3. Nicolas PitreMar 12, 2008
  4. Junio C HamanoMar 12, 2008
  5. Johannes SchindelinMar 12, 2008
  6. Nicolas PitreMar 12, 2008
  7. Pieter de BieMar 12, 2008
  8. Johannes SchindelinMar 12, 2008
  9. Jeff KingMar 12, 2008
  10. Pieter de BieMar 12, 2008
  11. Junio C HamanoMar 12, 2008
  12. Johannes SchindelinMar 12, 2008
  13. Junio C HamanoMar 12, 2008
  14. Geert BoschMar 12, 2008
  15. Nicolas PitreMar 12, 2008
  16. Marko KreenMar 12, 2008
  17. gc: call "prune --expire 2.weeks.ago" by defaultJohannes Schindelin, Mar 12, 2008
  18. Brandon CaseyMar 12, 2008
  19. Jakub NarebskiMar 12, 2008
  20. Johannes SchindelinMar 12, 2008
  21. Junio C HamanoMar 12, 2008
  22. Johannes SchindelinMar 12, 2008
  23. gc: call "prune --expire 2.weeks.ago" by defaultJohannes Schindelin, Mar 12, 2008
  24. Johannes SchindelinMar 12, 2008
  25. Brandon CaseyMar 12, 2008
  26. Johannes SchindelinMar 12, 2008
  27. Brandon CaseyMar 12, 2008
  28. Junio C HamanoMar 12, 2008
  29. gc: call "prune --expire 2.weeks.ago" by defaultJohannes Schindelin, Mar 12, 2008
  30. Johannes SchindelinMar 12, 2008
  31. Junio C HamanoMar 12, 2008
  32. Nicolas PitreMar 12, 2008
  33. Johannes SchindelinMar 12, 2008
  34. Junio C HamanoMar 12, 2008
  35. Johannes SchindelinMar 12, 2008
  36. Junio C HamanoMar 12, 2008
  37. Johannes SchindelinMar 12, 2008
  38. Wincent ColaiutaMar 13, 2008
  39. Johannes SixtMar 13, 2008
  40. Wincent ColaiutaMar 13, 2008
  41. Johannes SchindelinMar 13, 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.