Web lists-archives.com

Re: [RFC 0/4] Shallow clones with on-demand fetch

On 03/04/2017 11:18 AM, Mark Thomas wrote:
I was inspired a bit by Microsoft's announcement of their Git VFS.  I
saw that people have talked in the past about making git fetch objects
from remotes as they are needed, and decided to give it a try.

For reference, one such conversation is [1]. (cc-ing Ben Peart also)

The patch series adds a "--on-demand" option to git clone, which, when
used in conjunction with the existing shallow clone operations, clones
the full history of the repository's commits, but only the files that
would be included in the shallow clone.

When a file that is missing is required, git requests the file on-demand
from the remote, via a new 'upload-file' service.

A reachability check (of the blob) might be a good idea. The current Git implementation already supports fetching a blob (perhaps a bug) but has problems with reachability calculations that I tried to fix in [2], but found some bugs that weren't easily fixable.

As I said in [2], I think that proper fetching of blobs on demand is a prerequisite to any sort of missing object tolerance (like your on-demand clones), so I haven't thought much about the topics in the rest of your patch set.

[1] <20170113155253.1644-1-benpeart@xxxxxxxxxxxxx> (you can search for emails by Message ID in online archives like https://public-inbox.org/git if you don't already have them)
[2] <cover.1487984670.git.jonathantanmy@xxxxxxxxxx>