diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2017-12-08 15:58:47 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-08 09:58:51 -0800 |
commit | c0c578b33ca48ee6003d85706e13d97d12781354 (patch) | |
tree | 6f7123769b5c1c4231cdf10958d0d41fe8a844f0 /fetch-object.h | |
parent | clone: partial clone (diff) | |
download | tgif-c0c578b33ca48ee6003d85706e13d97d12781354.tar.xz |
unpack-trees: batch fetching of missing blobs
When running checkout, first prefetch all blobs that are to be updated
but are missing. This means that only one pack is downloaded during such
operations, instead of one per missing blob.
This operates only on the blob level - if a repository has a missing
tree, they are still fetched one at a time.
This does not use the delayed checkout mechanism introduced in commit
2841e8f ("convert: add "status=delayed" to filter process protocol",
2017-06-30) due to significant conceptual differences - in particular,
for partial clones, we already know what needs to be fetched based on
the contents of the local repo alone, whereas for status=delayed, it is
the filter process that tells us what needs to be checked in the end.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch-object.h')
-rw-r--r-- | fetch-object.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fetch-object.h b/fetch-object.h index f371300c88..4b269d07ed 100644 --- a/fetch-object.h +++ b/fetch-object.h @@ -1,6 +1,11 @@ #ifndef FETCH_OBJECT_H #define FETCH_OBJECT_H +#include "sha1-array.h" + extern void fetch_object(const char *remote_name, const unsigned char *sha1); +extern void fetch_objects(const char *remote_name, + const struct oid_array *to_fetch); + #endif |