diff_populate_filespec() accepts an struct repository "r" as parameter
but implicitly uses the_repository when calling read_object_file(). To
be more consistent, replace this call with
repo_read_object_file(r, ...).

Signed-off-by: Matheus Tavares <matheus.bernard...@usp.br>
---
 diff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diff.c b/diff.c
index 663b5d01f8..c743e4ce50 100644
--- a/diff.c
+++ b/diff.c
@@ -4044,7 +4044,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;
-- 
2.23.0

Reply via email to