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

Re: What's up with the GIT archive on www.kernel.org?

From
Linus Torvalds <torvalds@osdl.org>
Date
Sep 11, 2005, 19:06 UTC
Message-ID
<Pine.LNX.4.58.0509111157360.3242@g5.osdl.org>
In-Reply-To
<20050911185711.GA22556@mars.ravnborg.org>
On Sun, 11 Sep 2005, Sam Ravnborg wrote:
Show 9 quoted lines
> > 
> > Absolutely. The mirroring has been slow again lately. I've packed my 
> > archive, but I suspect others should much more aggressively now be using 
> > the "objects/info/alternates" information to point to my tree, so that 
> > they don't even need to have their objects at all (no packing 
> > even necessary - just running "git prune-packed" on peoples archives 
> > would get rid of any duplicate objects when I pack mine).
> 
> Can you post a small description how to utilize this method?
Just do
	echo /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects > objects/info/alternates

in your tree, and that will tell git that your tree can use my object directory as an "alternate" source of objects. At that point, you can remove all objects that I have.

However, that only works with a local directory - you can't say that the alternate object directory is over the network (unless you use NFS or similar, of course ;).

Another potential problem is that while the above makes git understand to pick the objects from my directory, it can in theory cause problems for mirrors etc - since they mirror things to a different location and/or may not mirror all of it anyway.

Anyway, modulo those caveats, you can then just do
	git prune-packed

and it will remove all unpacked objects in your git archive that can be reached through a pack-file - including any packfiles in _my_ directory.

Then you never need to pack your own objects any more. Just leave everything unpacked, and rely on me packing every once in a while, and just do "git prune-packed" when I do.

That allows a site like kernel.org to effectively share 99% of all objects, and do it efficiently.

		Linus
Next: Sam Ravnborg
Message 1 of 18 in “Re: What's up with the GIT archive on www.kernel.org?”
  1. Linus TorvaldsSep 11, 2005
  2. Sam RavnborgSep 11, 2005
  3. Linus TorvaldsSep 11, 2005
  4. Roland DreierSep 11, 2005
  5. Linus TorvaldsSep 11, 2005
  6. Linus TorvaldsSep 11, 2005
  7. Junio C HamanoSep 12, 2005
  8. Dmitry TorokhovSep 12, 2005
  9. Ryan AndersonSep 12, 2005
  10. Linus TorvaldsSep 12, 2005
  11. Define relative .git/objects/info/alternates semantics.Junio C Hamano, Sep 13, 2005
  12. Linus TorvaldsSep 13, 2005
  13. Junio C HamanoSep 13, 2005
  14. Daniel BarkalowSep 13, 2005
  15. H. Peter AnvinSep 12, 2005
  16. Tony LuckSep 12, 2005
  17. Linus TorvaldsSep 12, 2005
  18. Junio C HamanoSep 11, 2005

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.