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

Re: efficient cloning

From
James Cloos <cloos@jhcloos.com>
Date
Mar 20, 2006, 00:32 UTC
Message-ID
<m3wteqj6qx.fsf@lugabout.cloos.reno.nv.us>
In-Reply-To
<7vu09um3ae.fsf@assigned-by-dhcp.cox.net>
>>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:

Junio> "The same repo as this script" is a very poor way to define what Junio> you really want.

I don't think so. Getting the same values in files like FETCH_HEAD, ORIG_HEAD, branches/*, remotes/*, info/* et al is not obvious. Especially, eg, all of the same Push/Pull lines.

Junio> What is "git-repack -a -d -s"?
A typo.  I of course meant -a -d -l.

Junio> It might be worth adding a --reference flag to git-clone like Junio> this patch does.

That is essentially what I tried (except only the name of the flag; I prefer your choice). I didn't include the reference-tmp logic, but otherwise it looks about the same.

Junio> However, this patch alone does not reduce the transferred data Junio> during cloning any smaller if you are using the "$1" repository Junio> over git native transport (including a local repository), Junio> because the current clone-pack does not look at existing refs

Exactly the wall I ran into.  And I really only need it for git://.

Junio> Maybe it would be a good idea to deprecate Junio> clone-pack altogether, use fetch-pack -k, and implement the Junio> "copy upstream refs to our refs" logic in git-clone.sh. We need Junio> to do something like that if/when we are switching to use Junio> $GIT_DIR/refs/remotes/ to store tracking branches outside Junio> refs/heads anyway.

And it looks like you've shown me the door in that wall.
I'll have to read up on fetch-pack as opposed to clone-pack.
-JimC
-- 
James H. Cloos, Jr. <cloos@jhcloos.com>
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 22 in “efficient cloning”
  1. James CloosMar 19, 2006
  2. Shawn PearceMar 19, 2006
  3. Junio C HamanoMar 19, 2006
  4. James CloosMar 20, 2006
  5. Junio C HamanoMar 20, 2006
  6. Junio C HamanoMar 20, 2006
  7. Petr BaudisMar 20, 2006
  8. Junio C HamanoMar 20, 2006
  9. Petr BaudisMar 20, 2006
  10. Junio C HamanoMar 20, 2006
  11. Josef WeidendorferMar 20, 2006
  12. Junio C HamanoMar 20, 2006
  13. Petr BaudisMar 20, 2006
  14. Junio C HamanoMar 20, 2006
  15. Andreas EricssonMar 21, 2006
  16. Junio C HamanoMar 21, 2006
  17. Jeff KingMar 21, 2006
  18. Junio C HamanoMar 21, 2006
  19. Petr BaudisMar 21, 2006
  20. Josef WeidendorferMar 21, 2006
  21. Junio C HamanoMar 21, 2006
  22. Junio C HamanoMar 21, 2006

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.