Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-26 00:27:08 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-26 00:27:08 +0300
commit90891c6a0a7f9fd575f755dcb1b1e5cc067fc4ed (patch)
tree811d6a61a20cca504b75b5d3fabf2eebc20408dd
parentdae29547c9f0a4895f02d3ba21dc93a7b666e830 (diff)
parent31f5256c82a36edea3ea2f91e5171e3472878915 (diff)
Merge branch 'ds/object-info-for-prefetch-fix' into maint
Code cleanup and futureproof. * ds/object-info-for-prefetch-fix: sha1-file: split OBJECT_INFO_FOR_PREFETCH
-rw-r--r--object-store.h10
-rw-r--r--sha1-file.c2
2 files changed, 8 insertions, 4 deletions
diff --git a/object-store.h b/object-store.h
index 272e01e452..49f56ab8d9 100644
--- a/object-store.h
+++ b/object-store.h
@@ -277,10 +277,14 @@ struct object_info {
#define OBJECT_INFO_IGNORE_LOOSE 16
/*
* Do not attempt to fetch the object if missing (even if fetch_is_missing is
- * nonzero). This is meant for bulk prefetching of missing blobs in a partial
- * clone. Implies OBJECT_INFO_QUICK.
+ * nonzero).
*/
-#define OBJECT_INFO_FOR_PREFETCH (32 + OBJECT_INFO_QUICK)
+#define OBJECT_INFO_SKIP_FETCH_OBJECT 32
+/*
+ * This is meant for bulk prefetching of missing blobs in a partial
+ * clone. Implies OBJECT_INFO_SKIP_FETCH_OBJECT and OBJECT_INFO_QUICK
+ */
+#define OBJECT_INFO_FOR_PREFETCH (OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK)
int oid_object_info_extended(struct repository *r,
const struct object_id *,
diff --git a/sha1-file.c b/sha1-file.c
index ed5c50dac4..888b6024d5 100644
--- a/sha1-file.c
+++ b/sha1-file.c
@@ -1379,7 +1379,7 @@ int oid_object_info_extended(struct repository *r, const struct object_id *oid,
/* Check if it is a missing object */
if (fetch_if_missing && repository_format_partial_clone &&
!already_retried && r == the_repository &&
- !(flags & OBJECT_INFO_FOR_PREFETCH)) {
+ !(flags & OBJECT_INFO_SKIP_FETCH_OBJECT)) {
/*
* TODO Investigate having fetch_object() return
* TODO error/success and stopping the music here.