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

Why is git-clone --reference so slow?

From
David Woodhouse <dwmw2@infradead.org>
Date
Feb 5, 2007, 11:46 UTC
Message-ID
<1170676004.29759.767.camel@pmac.infradead.org>
My DSL line sucks; I know this. But why is git-clone so bad at using it?

This is slow and seems to be downloading a lot of stuff it doesn't need...

pmac /pmac/git $ git-clone --reference /pmac/git/linux-2.6 git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git
remote: Generating pack...
remote: Done counting 14428 objects.
remote: Deltifying 14428 objects.
remote:  100% (14428/14428) done
Indexing 14428 objects.
  25% (3662/14428) done

At this point I got bored and hit ^C, then logged in to hera and did it there, then rsync'd the result...

hera /home/dwmw2/x $ git-clone -n --bare --reference /pub/scm/linux/kernel/git/torvalds/linux-2.6.git /pub/scm/linux/kernel/git/geoff/ps3-linux.git 
remote: Generating pack...
remote: Done counting 14490 objects.
remote: Deltifying 14490 objects.
remote:  100% (14490/14490) done
Indexing 14490 objects.
remote: Total 14490, written 14490 (delta 579), reused 5598 (delta 367)
 100% (14490/14490) done
Resolving 579 deltas.
 100% (579/579) done

pmac /pmac/git/ps3-linux $ rsync -avz master.kernel.org:/home/dwmw2/x/ps3-linux/ .git pmac /pmac/git/ps3-linux $ echo /pmac/git/linux-2.6/.git/objects > .git/objects/info/alternates

That was a _lot_ faster, and abused my poor DSL line a lot less. Why's git so bad at it?

-- 
dwmw2
Next: Johannes Schindelin
Message 1 of 4 in “Why is git-clone --reference so slow?”
  1. David WoodhouseFeb 5, 2007
  2. Johannes SchindelinFeb 5, 2007
  3. David WoodhouseFeb 5, 2007
  4. Junio C HamanoFeb 7, 2007

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.