Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ce29cf8

Browse filesBrowse files
committed
Merge branch 'ds/object-info-for-prefetch-fix' into jch
Code cleanup and futureproof. * ds/object-info-for-prefetch-fix: sha1-file: split OBJECT_INFO_FOR_PREFETCH
2 parents 2505508 + 31f5256 commit ce29cf8
Copy full SHA for ce29cf8

File tree

Expand file treeCollapse file tree

2 files changed

+8
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-4
lines changed
Open diff view settings
Collapse file

‎object-store.h‎

Copy file name to clipboardExpand all lines: object-store.h
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,14 @@ struct object_info {
277277
#define OBJECT_INFO_IGNORE_LOOSE 16
278278
/*
279279
* Do not attempt to fetch the object if missing (even if fetch_is_missing is
280-
* nonzero). This is meant for bulk prefetching of missing blobs in a partial
281-
* clone. Implies OBJECT_INFO_QUICK.
280+
* nonzero).
282281
*/
283-
#define OBJECT_INFO_FOR_PREFETCH (32 + OBJECT_INFO_QUICK)
282+
#define OBJECT_INFO_SKIP_FETCH_OBJECT 32
283+
/*
284+
* This is meant for bulk prefetching of missing blobs in a partial
285+
* clone. Implies OBJECT_INFO_SKIP_FETCH_OBJECT and OBJECT_INFO_QUICK
286+
*/
287+
#define OBJECT_INFO_FOR_PREFETCH (OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK)
284288

285289
int oid_object_info_extended(struct repository *r,
286290
const struct object_id *,
Collapse file

‎sha1-file.c‎

Copy file name to clipboardExpand all lines: sha1-file.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ int oid_object_info_extended(struct repository *r, const struct object_id *oid,
13791379
/* Check if it is a missing object */
13801380
if (fetch_if_missing && repository_format_partial_clone &&
13811381
!already_retried && r == the_repository &&
1382-
!(flags & OBJECT_INFO_FOR_PREFETCH)) {
1382+
!(flags & OBJECT_INFO_SKIP_FETCH_OBJECT)) {
13831383
/*
13841384
* TODO Investigate having fetch_object() return
13851385
* TODO error/success and stopping the music here.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.