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

Re: Inefficiency of partial shallow clone vs shallow clone + "old-style" sparse checkout

From
KTKonstantin Tokarev <annulen@yandex.ru>
Date
Mar 31, 2020, 22:10 UTC
Message-ID
<8919571585692069@vla5-e043431e7e8d.qloud-c.yandex.net>
In-Reply-To
<decf87bb-dffc-e44e-912e-fe51bc2514c3@gmail.com>
28.03.2020, 19:58, "Derrick Stolee" <stolee@gmail.com>:
Show 11 quoted lines
> On 3/28/2020 10:40 AM, Jeff King wrote:
>>  On Sat, Mar 28, 2020 at 12:08:17AM +0300, Konstantin Tokarev wrote:
>>
>>>  Is it a known thing that addition of --filter=blob:none to workflow
>>>  with shalow clone (e.g. --depth=1) and following sparse checkout may
>>>  significantly slow down process and result in much larger .git
>>>  repository?
>
> In general, I would recommend not using shallow clones in conjunction
> with partial clone. The blob:none filter will get you what you really
> want from shallow clone without any of the downsides of shallow clone.
Is it really so?

As you can see from my measurements [1], in my case simple shallow clone (1) runs faster than simple partial clone (2) and produces slightly smaller .git, from which I can infer that (2) downloads some data which is not downloaded in (1).

To be clear, use case which I'm interested right now is checking out sources in cloud CI system like GitHub Actions for one shot build. Right now checkout usually takes 1-2 minutes and my hope was that someday in the future it would be possible\ to make it faster.

[1] https://gist.github.com/annulen/835ac561e22bedd7138d13392a7a53be
-- 
Regards,
Konstantin
Previous: Jeff KingNext: Konstantin Tokarev
Message 6 of 13 in “Inefficiency of partial shallow clone vs shallow clone + "old-style" sparse checkout”
  1. Konstantin TokarevMar 27, 2020
  2. Jeff KingMar 28, 2020
  3. Derrick StoleeMar 28, 2020
  4. Taylor BlauMar 31, 2020
  5. Jeff KingApr 1, 2020
  6. Konstantin TokarevMar 31, 2020
  7. Konstantin TokarevMar 31, 2020
  8. Derrick StoleeApr 1, 2020
  9. Konstantin TokarevApr 1, 2020
  10. Jeff KingApr 1, 2020
  11. clone: use "quick" lookup while following tagsJeff King, Apr 1, 2020
  12. Konstantin TokarevApr 1, 2020
  13. Jeff KingApr 1, 2020

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.