diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2019-08-20 22:53:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-08-21 00:04:26 +0200 |
commit | a63694f52355b412b65515961401cd2359fed544 (patch) | |
tree | 1d944a7cff1b50468c94cfe03232f85cd7a0a079 /diff.c | |
parent | Git 2.22.1 (diff) | |
download | git-a63694f52355b412b65515961401cd2359fed544.tar.xz git-a63694f52355b412b65515961401cd2359fed544.zip |
diff: skip GITLINK when lazy fetching missing objs
In 7fbbcb21b1 ("diff: batch fetching of missing blobs", 2019-04-08),
diff was taught to batch the fetching of missing objects when operating
on a partial clone, but was not taught to refrain from fetching
GITLINKs. Teach diff to check if an object is a GITLINK before including
it in the set to be fetched.
(As stated in the commit message of that commit, unpack-trees was also
taught a similar thing prior, but unpack-trees correctly checks for
GITLINK before including objects in the set to be fetched.)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -6487,6 +6487,7 @@ static void add_if_missing(struct repository *r, const struct diff_filespec *filespec) { if (filespec && filespec->oid_valid && + !S_ISGITLINK(filespec->mode) && oid_object_info_extended(r, &filespec->oid, NULL, OBJECT_INFO_FOR_PREFETCH)) oid_array_append(to_fetch, &filespec->oid); |