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

Re: Resumable clone/Gittorrent (again) - stable packs?

From
ILIlari Liusvaara <ilari.liusvaara@elisanet.fi>
Date
Jan 7, 2011, 21:45 UTC
Message-ID
<20110107214501.GA29959@LK-Perkele-VI.localdomain>
In-Reply-To
<20110107191719.GA6175@sigill.intra.peff.net>
On Fri, Jan 07, 2011 at 02:17:19PM -0500, Jeff King wrote:
Show 11 quoted lines
> On Fri, Jan 07, 2011 at 08:52:18PM +0200, Ilari Liusvaara wrote:
> 
> > 
> > git clone --use-mirror=~/repositories/linux-2.6 git://foo.example/linux-foo
> > 
> > This would first fetch everything from local source and then update that
> > from remote, likely being vastly faster.
> 
> I'm not clear in your example what ~/repositories/linux-2.6 is. Is it a
> repo? In that case, isn't that basically the same as --reference? Or is
> it a local mirror list?

Yes, it is a repo. No, it isn't the same as --reference. It is list of mirrors to try first before connecting to final repository and can be any type of repository URL (local, true smart transport, smart HTTP, dumb HTTP, etc...)

Idea is that you have list of mirrors that are faster than the final repository, but not necressarily complete. You want to download most of the stuff from there.

Show 5 quoted lines
> If the latter, then yeah, I think it is a good idea. Clients should
> definitely be able to ignore, override, or add to mirror lists provided
> by servers. The server can provide hints about useful mirrors, but it is
> up to the client to decide which methods are useful to it and which
> mirrors are closest.

This is essentially adding mirrors to mirror list (modulo that mirrors are not assumed to be complete).

Security:
Confidentiality: The connection to mirror must transverse only trusted
links or be encrypted if material from mirror is sensitive.
Integerity: The same integerity as the connection to final repo (assuming
SHA-1 can't be collided) due to fact that git object naming is securely
unique.
Show 6 quoted lines
> Of course there are some servers who will want to do more than hint
> (e.g., the gentoo case where they really don't want people cloning from
> the main machine). For those cases, though, I think it is best to
> provide the hint and to reject clients who don't follow it (e.g., by
> barfing on somebody who tries to do a full clone). You have to implement
> that rejection layer anyway for older clients.
With option like this, a client could do:
git clone --use-mirror=http://git.example.org/base/foo git://git.example.org/foo

To first grab stuff via HTTP (well-packed dumb HTTP is very light on the server) and then continue via git:// (now much cheaper because client is relatively up to date).

-Ilari
Previous: Jeff KingNext: Jeff King
Message 16 of 22 in “Re: Resumable clone/Gittorrent (again) - stable packs?”
  1. Zenaan HarknessJan 6, 2011
  2. Shawn PearceJan 6, 2011
  3. John WyzerJan 10, 2011
  4. Sam VilainJan 10, 2011
  5. Nguyen Thai Ngoc DuyJan 11, 2011
  6. J.H.Jan 11, 2011
  7. Nguyen Thai Ngoc DuyJan 11, 2011
  8. Nicolas PitreJan 6, 2011
  9. Zenaan HarknessJan 7, 2011
  10. Nicolas PitreJan 7, 2011
  11. Jeff KingJan 7, 2011
  12. Jeff KingJan 7, 2011
  13. Zenaan HarknessJan 7, 2011
  14. Ilari LiusvaaraJan 7, 2011
  15. Jeff KingJan 7, 2011
  16. Ilari LiusvaaraJan 7, 2011
  17. Jeff KingJan 7, 2011
  18. Ilari LiusvaaraJan 7, 2011
  19. Jeff KingJan 7, 2011
  20. Sam VilainJan 10, 2011
  21. Nguyen Thai Ngoc DuyJan 10, 2011
  22. Nicolas PitreJan 10, 2011

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.