]> git.ipfire.org Git - thirdparty/git.git/commitdiff
diff: make diff_populate_filespec() honor its repo argument
authorMatheus Tavares <matheus.bernardino@usp.br>
Thu, 30 Jan 2020 20:32:17 +0000 (17:32 -0300)
committerJunio C Hamano <gitster@pobox.com>
Fri, 31 Jan 2020 18:45:39 +0000 (10:45 -0800)
diff_populate_filespec() takes a struct repository argument but it
doesn't get passed down to read_object_file().

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c

diff --git a/diff.c b/diff.c
index 8e2914c0312ce7004c6b6ce3ab4b84b846630d65..0f333c27d6f4740f1469b1cf369421896c41b7cc 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -4024,7 +4024,7 @@ int diff_populate_filespec(struct repository *r,
                                return 0;
                        }
                }
-               s->data = read_object_file(&s->oid, &type, &s->size);
+               s->data = repo_read_object_file(r, &s->oid, &type, &s->size);
                if (!s->data)
                        die("unable to read %s", oid_to_hex(&s->oid));
                s->should_free = 1;