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

Re: git gc & deleted branches

From
Nicolas Pitre <nico@cam.org>
Date
May 8, 2008, 21:15 UTC
Message-ID
<alpine.LFD.1.10.0805081712270.23581@xanadu.home>
In-Reply-To
<20080508210125.GC32762@sigill.intra.peff.net>
On Thu, 8 May 2008, Jeff King wrote:
Show 17 quoted lines
> On Thu, May 08, 2008 at 10:52:19PM +0200, Guido Ostkamp wrote:
> 
> >> And be assured that the objects referenced by a deleted branch will be  
> >> removed from the repository eventually as long as 'git gc --prune' is  
> >> run periodically.
> >
> > Ok. I did not know about the 'prune' option yet as it neither mentioned in 
> > the "Git Tutorial" nor "Everyday Git", there only 'git gc' is used with no 
> > options.
> 
> It is deprecated; see 25ee9731.
> 
> According to that commit message, prune is now a no-op. However, it
> looks like it is still used for trigger a "repack -a" rather than
> "repack -A". I don't know if it is worth making that behavior available
> through some more sane command line option (I would think people who
> really know that they want "repack -a" would just call it).
Well, actually this is a problem.

I think it is a good thing to deprecate gc --prune. but if that means that repack -a is never used then unreferenced and expired objects will never be pruned if they're packed if one is always using 'git gc' as we are advocating.

Nicolas
Previous: Jeff KingNext: Jeff King
Message 7 of 50 in “git gc & deleted branches”
  1. Guido OstkampMay 8, 2008
  2. Jeff KingMay 8, 2008
  3. Guido OstkampMay 8, 2008
  4. Brandon CaseyMay 8, 2008
  5. Guido OstkampMay 8, 2008
  6. Jeff KingMay 8, 2008
  7. Nicolas PitreMay 8, 2008
  8. Jeff KingMay 8, 2008
  9. Brandon CaseyMay 8, 2008
  10. Jeff KingMay 8, 2008
  11. Brandon CaseyMay 8, 2008
  12. Jeff KingMay 8, 2008
  13. Brandon CaseyMay 8, 2008
  14. Jeff KingMay 8, 2008
  15. Brandon CaseyMay 9, 2008
  16. Junio C HamanoMay 9, 2008
  17. 0/3 leave unreferenced objects unpackeddrafnel@gmail.com, May 10, 2008
  18. 1/3 repack: modify behavior of -A option to leave unreferenced objects unpackeddrafnel@gmail.com, May 10, 2008
  19. Jeff KingMay 10, 2008
  20. Nicolas PitreMay 11, 2008
  21. Junio C HamanoMay 11, 2008
  22. Brandon CaseyMay 11, 2008
  23. Brandon CaseyMay 11, 2008
  24. 2/3 git-gc: always use -A when manually repackingdrafnel@gmail.com, May 10, 2008
  25. 3/3 builtin-gc.c: deprecate --prune, it now really has no effectdrafnel@gmail.com, May 10, 2008
  26. Jeff KingMay 9, 2008
  27. Geert BoschMay 9, 2008
  28. Brandon CaseyMay 9, 2008
  29. Jeff KingMay 9, 2008
  30. Brandon CaseyMay 9, 2008
  31. Nicolas PitreMay 9, 2008
  32. Brandon CaseyMay 9, 2008
  33. Junio C HamanoMay 9, 2008
  34. Updating documentation to match Brandon Casey's proposed git-repack patch.Chris Frey, May 9, 2008
  35. Jeremy Maitin-ShepardMay 10, 2008
  36. Shawn O. PearceMay 10, 2008
  37. Jeremy Maitin-ShepardMay 10, 2008
  38. Junio C HamanoMay 10, 2008
  39. Jeremy Maitin-ShepardMay 10, 2008
  40. Jeff KingMay 10, 2008
  41. Jeremy Maitin-ShepardMay 10, 2008
  42. Johannes SchindelinMay 10, 2008
  43. Jeremy Maitin-ShepardMay 10, 2008
  44. Johannes SchindelinMay 11, 2008
  45. Junio C HamanoMay 11, 2008
  46. Guido OstkampMay 8, 2008
  47. Jeff KingMay 8, 2008
  48. Jeff KingMay 8, 2008
  49. Brandon CaseyMay 10, 2008
  50. Brandon CaseyMay 10, 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.