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

[RFC/PATCH v2 0/1] Add support for downloading blobs on demand

From
Ben Peart <peartben@gmail.com>
Date
Jul 14, 2017, 13:26 UTC
Message-ID
<20170714132651.170708-1-benpeart@microsoft.com>

This patch series enables git to request missing objects when they are not found in the object store. This is a fault-in model where the "read-object" sub-process will fetch the missing object and store it in the object store as a loose, alternate, or pack file. On success, git will retry the operation and find the requested object.

It utilizes the recent sub-process refactoring to spawn a "read-object" hook as a sub-process on the first request and then all subsequent requests are made to that existing sub-process. This significantly reduces the cost of making multiple request within a single git command.

An earlier version [1] of this patch series is pulled into [2] which enables registering multiple ODB handlers which can be a simple command or a sub-process. My hope is that this patch series can be completed to meet the needs of the various efforts where faulting in missing objects is required.

In the meantime, now that the sub-process refactoring has made it to master, I�ve refactored this patch series to be as small and focused as possible so it can be easily incorporated in other patch series where it makes sense.

[3] has a need for faulting in missing objects and will be reworked to take advantage of this patch series for its next iteration.

[4] has a similar function that uses a registered command instead of a sub-process. Spawning a separate process for every missing object only works if there are very few missing objects. It does not scale well when there are many missing objects (especially small objects like commits and trees).

Patch is available here: https://github.com/benpeart/git-for-windows/commits/read-object-process

[RFC] Add support for downloading blobs on demand [1] https://public-inbox.org/git/20170113155253.1644-1-benpeart@microsoft.com/

[RFC/PATCH v4 00/49] Add initial experimental external ODB support [2] https://public-inbox.org/git/20170620075523.26961-1-chriscool@tuxfamily.org/

[PATCH v2 00/19] WIP object filtering for partial clone [3] https://public-inbox.org/git/20170713173459.3559-1-git@jeffhostetler.com/

[RFC PATCH 0/3] Partial clone: promised blobs (formerly "missing blobs") [4] https://public-inbox.org/git/cover.1499800530.git.jonathantanmy@google.com/

Ben Peart (1):
  sha1_file: Add support for downloading blobs on demand
 Documentation/technical/read-object-protocol.txt | 102 ++++++++++++
 cache.h                                          |   1 +
 config.c                                         |   5 +
 contrib/long-running-read-object/example.pl      | 114 +++++++++++++
 environment.c                                    |   1 +
 sha1_file.c                                      | 193 ++++++++++++++++++++++-
 t/t0410-read-object.sh                           |  27 ++++
 t/t0410/read-object                              | 114 +++++++++++++
 8 files changed, 550 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/technical/read-object-protocol.txt
 create mode 100755 contrib/long-running-read-object/example.pl
 create mode 100755 t/t0410-read-object.sh
 create mode 100755 t/t0410/read-object
-- 
2.13.2.windows.1
Next: Ben Peart
Message 1 of 6 in “Add support for downloading blobs on demand”
  1. 0/1 Add support for downloading blobs on demandBen Peart, Jul 14, 2017
  2. 1/1 sha1_file: Add support for downloading blobs on demandBen Peart, Jul 14, 2017
  3. Christian CouderJul 14, 2017
  4. Jonathan TanJul 17, 2017
  5. Ben PeartJul 17, 2017
  6. Jonathan TanJul 17, 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.