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

Re: [PATCH] RFC: git lazy clone proof-of-concept

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 10, 2008, 17:45 UTC
Message-ID
<alpine.LSU.1.00.0802101649110.11591@racer.site>
In-Reply-To
<ee77f5c20802100846g10937a49m4901f88a70a6de0@mail.gmail.com>
Hi,
On Sun, 10 Feb 2008, David Symonds wrote:
Show 19 quoted lines
> On Feb 10, 2008 4:08 AM, Johannes Schindelin 
> <Johannes.Schindelin@gmx.de> wrote:
>
> > On Sun, 10 Feb 2008, Marco Costalba wrote:
> >
> > > Linux git repository is not very big and can be downloaded with 
> > > easy. On the other end Linux history spans many more years then the 
> > > repo does.
> > >
> > > The design choice here is two have *two repositories*, one with 
> > > recent stuff and one historical, with stuff older then version 
> > > 2.6.12
> >
> > I do not think that this is an option: Jan already tried a shallow 
> > clone (which would amount to something like what you propose), and it 
> > was still too large.
> 
> I think that was still pulling all the branches, so a shallow clone of 
> just a couple of branches might be feasible.
Indeed:
$ git ls-remote git://o3-build.services.openoffice.org/git/ooo.git|wc -l
3970
$ git ls-remote --heads git://o3-build.services.openoffice.org/git/ooo.git|
	wc -l
751

Fetching just master is a little hard on the server (it spends quite a lot of time deltifying -- minutes! -- especially between 80% and 95%, and indexing is even slower), but other than that:

$ /usr/bin/time git fetch --depth=1 \
	git://o3-build.services.openoffice.org/git/ooo.git \
	master:refs/remotes/origin/master
warning: no common commits
remote: Generating pack...
remote: Done counting 79934 objects.
remote: Deltifying 79934 objects...
remote:  100% (79934/79934) done
Indexing 79934 objects...
remote: Total 79934 (delta 34549), reused 51323 (delta 20737)
 100% (79934/79934) done
Resolving 34549 deltas...
 100% (34549/34549) done
* refs/remotes/origin/master: storing branch 'master' of 
git://o3-build.services.openoffice.org/git/ooo
  commit: 29990e4
46.48user 4.60system 16:48.29elapsed 5%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (0major+941205minor)pagefaults 0swaps
$ du .git/objects/pack/
464688  .git/objects/pack/
$ /usr/bin/time git repack -a -d -f --window=250 --depth=250
Generating pack...
Done counting 79934 objects.
Deltifying 79934 objects...
 100% (79934/79934) done
Writing 79934 objects...
 100% (79934/79934) done
Total 79934 (delta 40013), reused 0 (delta 0)
Pack pack-350e4edca93ee75ef3d85269284a24775bf6b24f created.
Removing unused objects 100%...
Done.
1869.78user 6.66system 31:36.50elapsed 98%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (2031major+1753824minor)pagefaults 0swaps
$ du .git/objects/pack/
454636  .git/objects/pack/

Of course, the clone time would be reduced dramatically if the repository you clone from has only "master", and is fully (re-)packed.

So I was not completely correct in my assumption that a clear cut a la linux-2.6 (possibly grafting historical-linux) would not help.

Ciao, Dscho

Previous: David SymondsNext: Nicolas Pitre
Message 9 of 85 in “RFC: git lazy clone proof-of-concept”
  1. RFC: git lazy clone proof-of-conceptJan Holesovsky, Feb 8, 2008
  2. Nicolas PitreFeb 8, 2008
  3. Jan HolesovskyFeb 9, 2008
  4. Mike HommeyFeb 9, 2008
  5. Nicolas PitreFeb 9, 2008
  6. Marco CostalbaFeb 10, 2008
  7. Johannes SchindelinFeb 10, 2008
  8. David SymondsFeb 10, 2008
  9. Johannes SchindelinFeb 10, 2008
  10. Nicolas PitreFeb 10, 2008
  11. Johannes SchindelinFeb 10, 2008
  12. Harvey HarrisonFeb 8, 2008
  13. Jan HolesovskyFeb 9, 2008
  14. Johannes SchindelinFeb 8, 2008
  15. Mike HommeyFeb 8, 2008
  16. Johannes SchindelinFeb 8, 2008
  17. Jan HolesovskyFeb 9, 2008
  18. Jakub NarebskiFeb 8, 2008
  19. Jon SmirlFeb 8, 2008
  20. Nicolas PitreFeb 8, 2008
  21. Andreas EricssonFeb 11, 2008
  22. 1/2 pack-objects: Allow setting the #threads equal to #cpus automaticallyBrandon Casey, Feb 12, 2008
  23. Andreas EricssonFeb 12, 2008
  24. Harvey HarrisonFeb 8, 2008
  25. Jon SmirlFeb 8, 2008
  26. Harvey HarrisonFeb 8, 2008
  27. Jon SmirlFeb 8, 2008
  28. Jan HolesovskyFeb 9, 2008
  29. Nicolas PitreFeb 10, 2008
  30. SeanFeb 10, 2008
  31. Nicolas PitreFeb 10, 2008
  32. SeanFeb 10, 2008
  33. Jakub NarebskiFeb 11, 2008
  34. Nicolas PitreFeb 11, 2008
  35. Jakub NarebskiFeb 11, 2008
  36. Joachim B HagaFeb 10, 2008
  37. Johannes SchindelinFeb 10, 2008
  38. Jon SmirlFeb 10, 2008
  39. Johannes SchindelinFeb 10, 2008
  40. Johannes SchindelinFeb 10, 2008
  41. Nicolas PitreFeb 10, 2008
  42. Jon SmirlFeb 10, 2008
  43. Johannes SchindelinFeb 12, 2008
  44. Nicolas PitreFeb 12, 2008
  45. Linus TorvaldsFeb 12, 2008
  46. Jon SmirlFeb 12, 2008
  47. Linus TorvaldsFeb 12, 2008
  48. Linus TorvaldsFeb 12, 2008
  49. Jon SmirlFeb 12, 2008
  50. Linus TorvaldsFeb 12, 2008
  51. Jon SmirlFeb 12, 2008
  52. Johannes SchindelinFeb 14, 2008
  53. Jakub NarebskiFeb 14, 2008
  54. Nicolas PitreFeb 14, 2008
  55. Johannes SchindelinFeb 14, 2008
  56. Jakub NarebskiFeb 14, 2008
  57. Johannes SchindelinFeb 14, 2008
  58. Brian DowningFeb 14, 2008
  59. Brian DowningFeb 14, 2008
  60. Johannes SchindelinFeb 15, 2008
  61. Nicolas PitreFeb 15, 2008
  62. Shawn O. PearceFeb 17, 2008
  63. Junio C HamanoFeb 17, 2008
  64. Nicolas PitreFeb 17, 2008
  65. Jakub NarebskiFeb 15, 2008
  66. Jan HolesovskyFeb 15, 2008
  67. Brandon CaseyFeb 14, 2008
  68. Jan HolesovskyFeb 15, 2008
  69. Nicolas PitreFeb 10, 2008
  70. Brandon CaseyFeb 14, 2008
  71. Johannes SchindelinFeb 14, 2008
  72. Nicolas PitreFeb 14, 2008
  73. Jakub NarebskiFeb 11, 2008
  74. Johannes SchindelinFeb 8, 2008
  75. Jakub NarebskiFeb 8, 2008
  76. Johannes SchindelinFeb 8, 2008
  77. Mike HommeyFeb 8, 2008
  78. Johannes SchindelinFeb 8, 2008
  79. Mike HommeyFeb 8, 2008
  80. Johannes SchindelinFeb 8, 2008
  81. Mike HommeyFeb 8, 2008
  82. Jan HudecFeb 9, 2008
  83. Jan HolesovskyFeb 9, 2008
  84. 2/2 pack-objects: Default to zero threads, meaning auto-assign to #cpusBrandon Casey, Feb 12, 2008
  85. Nicolas PitreFeb 12, 2008

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.