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

Re: Why repository grows after "git gc"? / Purpose of *.keep files?

From
A Large Angry SCM <gitzilla@gmail.com>
Date
May 14, 2008, 23:24 UTC
Message-ID
<482B7491.30608@gmail.com>
In-Reply-To
<alpine.LFD.1.10.0805141333050.3019@woody.linux-foundation.org>
Linus Torvalds wrote:
Show 29 quoted lines
> 
> On Wed, 14 May 2008, Nicolas Pitre wrote:
> 
>> On Wed, 14 May 2008, Linus Torvalds wrote:
>>
>>> Of course, the more aggressively we prune, the more we end up having to 
>>> depend on the fact that a commit that is in a pack that is marked "keep" 
>>> must *always* have everything that leads to it in that pack or others also 
>>> marked "keep". We effectively have that already (because we've always 
>>> pruned away the commits early), but it's a thing to keep in mind whenever 
>>> we prune even more aggressively.
>> I wonder if this is a good thing.  Such a rule would effectively put 
>> restrictions on how objects like big blobs could be distributed amongst 
>> many .keep packs.  I just wish we're not painting ourselves in a corner.
> 
> You can distribute big objects arbitrarily among many .keep packs, but 
> what you can *NOT* do (and which has _always_ been a bug to do) is to have 
> a *.keep pack that refers to objects that are not in a .keep pack!
> 
> So keep<->keep you can do anything you want, and distribute objects any 
> way.
> 
> But a keep pack must only refer to objects in itself or in other keep 
> packs.
> 
> Because otherwise, if we ever hit an object in a keep pack, we'll stop 
> even looking further when we use --unpacked. And that has always been true 
> (admittedly only for "commit" objects, but those are the ones that most 
> commonly refer to other objects, so ..)
Sounds like git-fsck needs to start checking for this.
Previous: Linus TorvaldsNext: Nicolas Pitre
Message 25 of 35 in “Why repository grows after "git gc"? / Purpose of *.keep files?”
  1. Teemu LikonenMay 12, 2008
  2. Teemu LikonenMay 12, 2008
  3. Johannes SchindelinMay 12, 2008
  4. Teemu LikonenMay 12, 2008
  5. Nicolas PitreMay 12, 2008
  6. Teemu LikonenMay 12, 2008
  7. Nicolas PitreMay 12, 2008
  8. Govind SalinasMay 12, 2008
  9. Nicolas PitreMay 12, 2008
  10. Govind SalinasMay 12, 2008
  11. Teemu LikonenMay 12, 2008
  12. Mike HommeyMay 12, 2008
  13. Mike HommeyMay 12, 2008
  14. Shawn O. PearceMay 13, 2008
  15. Mike HommeyMay 13, 2008
  16. Nicolas PitreMay 14, 2008
  17. Junio C HamanoMay 14, 2008
  18. Juergen RuehleMay 14, 2008
  19. Nicolas PitreMay 14, 2008
  20. Junio C HamanoMay 14, 2008
  21. Linus TorvaldsMay 14, 2008
  22. Linus TorvaldsMay 14, 2008
  23. Nicolas PitreMay 14, 2008
  24. Linus TorvaldsMay 14, 2008
  25. A Large Angry SCMMay 14, 2008
  26. Nicolas PitreMay 12, 2008
  27. David TweedMay 12, 2008
  28. Shawn O. PearceMay 12, 2008
  29. Junio C HamanoMay 12, 2008
  30. Shawn O. PearceMay 13, 2008
  31. Paolo BonziniMay 13, 2008
  32. Shawn O. PearceMay 13, 2008
  33. Teemu LikonenMay 13, 2008
  34. Stephen R. van den BergMay 13, 2008
  35. Teemu LikonenMay 14, 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.