diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-04-28 15:50:04 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-04-28 15:50:04 -0700 |
| commit | 8f5dc5a4af3fa32bf9261b76b0f1146fd15b8643 (patch) | |
| tree | 0c93139e94d1964edec168d2cf02f6c0e1298b6d /line-log.c | |
| parent | 772d78563697c39d5d35d090cb2b5724a1812e7f (diff) | |
| parent | 95acf11a3dc3d18ec999f4913ec6c6a54545c6b7 (diff) | |
| download | git-8f5dc5a4af3fa32bf9261b76b0f1146fd15b8643.tar.gz | |
Merge branch 'jt/avoid-prefetch-when-able-in-diff'
"git diff" in a partial clone learned to avoid lazy loading blob
objects in more casese when they are not needed.
* jt/avoid-prefetch-when-able-in-diff:
diff: restrict when prefetching occurs
diff: refactor object read
diff: make diff_populate_filespec_options struct
promisor-remote: accept 0 as oid_nr in function
Diffstat (limited to 'line-log.c')
| -rw-r--r-- | line-log.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/line-log.c b/line-log.c index 9010e00950..40e1738dbb 100644 --- a/line-log.c +++ b/line-log.c @@ -519,7 +519,7 @@ static void fill_line_ends(struct repository *r, unsigned long *ends = NULL; char *data = NULL; - if (diff_populate_filespec(r, spec, 0)) + if (diff_populate_filespec(r, spec, NULL)) die("Cannot read blob %s", oid_to_hex(&spec->oid)); ALLOC_ARRAY(ends, size); @@ -1045,12 +1045,12 @@ static int process_diff_filepair(struct rev_info *rev, return 0; assert(pair->two->oid_valid); - diff_populate_filespec(rev->diffopt.repo, pair->two, 0); + diff_populate_filespec(rev->diffopt.repo, pair->two, NULL); file_target.ptr = pair->two->data; file_target.size = pair->two->size; if (pair->one->oid_valid) { - diff_populate_filespec(rev->diffopt.repo, pair->one, 0); + diff_populate_filespec(rev->diffopt.repo, pair->one, NULL); file_parent.ptr = pair->one->data; file_parent.size = pair->one->size; } else { |
