summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-09-09 19:26:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-09-09 19:26:38 (GMT)
commitd8b1ce79729b1744727c29ec818c34ec43ee9599 (patch)
treea21bcc0d9437bad6fd5f37361a11381fd8e05ee9 /diff.c
parent8ce8a63b46298501c9afebfea28ed3339a9104b7 (diff)
parenta63694f52355b412b65515961401cd2359fed544 (diff)
downloadgit-d8b1ce79729b1744727c29ec818c34ec43ee9599.zip
git-d8b1ce79729b1744727c29ec818c34ec43ee9599.tar.gz
git-d8b1ce79729b1744727c29ec818c34ec43ee9599.tar.bz2
Merge branch 'jt/diff-lazy-fetch-submodule-fix'
On-demand object fetching in lazy clone incorrectly tried to fetch commits from submodule projects, while still working in the superproject, which has been corrected. * jt/diff-lazy-fetch-submodule-fix: diff: skip GITLINK when lazy fetching missing objs
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index efe42b3..e28b463 100644
--- a/diff.c
+++ b/diff.c
@@ -6512,6 +6512,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);