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

Re: How hard would it be to implement sparse fetching/pulling?

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Dec 1, 2017, 16:03 UTC
Message-ID
<e93127b9-d6d6-dcf2-3d58-dc83d68d5d20@jeffhostetler.com>
In-Reply-To
<20171130200341.GA20640@aiede.mtv.corp.google.com>
On 11/30/2017 3:03 PM, Jonathan Nieder wrote:
Show 14 quoted lines
> Hi Vitaly,
> 
> Vitaly Arbuzov wrote:
> 
>> Found some details here: https://github.com/jeffhostetler/git/pull/3
>>
>> Looking at commits I see that you've done a lot of work already,
>> including packing, filtering, fetching, cloning etc.
>> What are some areas that aren't complete yet? Do you need any help
>> with implementation?
> 
> That's a great question!  I've filed https://crbug.com/git/2 to track
> this project.  Feel free to star it to get updates there, or to add
> updates of your own.
Thanks!
Show 16 quoted lines
> 
> As described at https://crbug.com/git/2#c1, currently there are three
> patch series for which review would be very welcome.  Building on top
> of them is welcome as well.  Please make sure to coordinate with
> jeffhost@microsoft.com and jonathantanmy@google.com (e.g. through the
> bug tracker or email).
> 
> One piece of missing functionality that looks intereseting to me: that
> series batches fetches of the missing blobs involved in a "git
> checkout" command:
> 
>   https://public-inbox.org/git/20171121211528.21891-14-git@jeffhostetler.com/
> 
> But if doesn't batch fetches of the missing blobs involved in a "git
> diff <commit> <commit>" command.  That might be a good place to get
> your hands dirty. :)

Jonathan Tan added code in unpack-trees to bulk fetch missing blobs before a checkout. This is limited to the missing blobs needed for the target commit. We need this to make checkout seamless, but it does mean that checkout may need online access.

I've also talked about a pre-fetch capability to bulk fetch missing blobs in advance of some operation. You could speed up the above diff command or back-fill all the blobs I might need before going offline for a while.

You can use the options that were added to rev-list to help with this.
For example:
     git rev-list --objects [--filter=<fs>] --missing=print <commit1>
     git rev-list --objects [--filter=<fs>] --missing=print <c1>..<c2>
And then pipe that into a "git fetch-pack --stdin".
You might experiment with this.
> 
> Thanks,
> Jonathan
> 

Thanks, Jeff

Previous: Jonathan NiederNext: Jonathan Nieder
Message 6 of 26 in “How hard would it be to implement sparse fetching/pulling?”
  1. Vitaly ArbuzovNov 30, 2017
  2. Jeff HostetlerNov 30, 2017
  3. Vitaly ArbuzovNov 30, 2017
  4. Vitaly ArbuzovNov 30, 2017
  5. Jonathan NiederNov 30, 2017
  6. Jeff HostetlerDec 1, 2017
  7. Jonathan NiederDec 1, 2017
  8. Philip OakleyNov 30, 2017
  9. Vitaly ArbuzovDec 1, 2017
  10. Vitaly ArbuzovDec 1, 2017
  11. Jonathan NiederDec 1, 2017
  12. Vitaly ArbuzovDec 1, 2017
  13. Philip OakleyDec 2, 2017
  14. Jeff HostetlerDec 1, 2017
  15. Philip OakleyDec 2, 2017
  16. Jeff HostetlerDec 4, 2017
  17. Philip OakleyDec 5, 2017
  18. Philip OakleyDec 2, 2017
  19. Jeff HostetlerDec 1, 2017
  20. Jonathan NiederDec 1, 2017
  21. Jeff HostetlerDec 4, 2017
  22. Philip OakleyDec 2, 2017
  23. Jeff HostetlerDec 5, 2017
  24. Jonathan NiederDec 5, 2017
  25. Jeff HostetlerDec 1, 2017
  26. Jeff HostetlerDec 1, 2017

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.