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

Re: Multi-threaded 'git clone'

From
Jeff King <peff@peff.net>
Date
Feb 17, 2015, 00:56 UTC
Message-ID
<20150217005632.GA13001@peff.net>
In-Reply-To
<CACsJy8Brnu7rBxtCq_ac58BW7dOK=wtzMxVL-gsOUXJB2Jss9w@mail.gmail.com>
On Tue, Feb 17, 2015 at 06:16:39AM +0700, Duy Nguyen wrote:
Show 9 quoted lines
> On Mon, Feb 16, 2015 at 10:47 PM, Jeff King <peff@peff.net> wrote:
> > Each clone generates the pack on the fly
> > based on what's on disk and streams it out. It should _usually_ be the
> > same, but there's nothing to guarantee byte-for-byte equality between
> > invocations.
> 
> It's usually _not_ the same. I tried when I wanted to produce stable
> packs. The first condition is single-threaded pack-objects. Otherwise
> thread scheduler could make object order unpredictable.

True. If you keep your server repositories fully packed, that eliminates the delta search (and/or makes it feasible to turn pack.threads to 1 to make it deterministic). But any change in the repository (e.g., somebody else pushing, even to a ref you are not fetching) can cause unexpected changes in the bytes.

-Peff
Previous: Duy Nguyen
Message 9 of 9 in “Multi-threaded 'git clone'”
  1. Koosha KhajehmoogahiFeb 16, 2015
  2. David LangFeb 16, 2015
  3. Jeff KingFeb 16, 2015
  4. David LangFeb 16, 2015
  5. Jeff KingFeb 16, 2015
  6. Junio C HamanoFeb 16, 2015
  7. Shawn PearceFeb 17, 2015
  8. Duy NguyenFeb 16, 2015
  9. Jeff KingFeb 17, 2015

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.