[RFC PATCH 1/3] diff: use the given repo at diff_populate_filespec()
- From
Matheus Tavares <matheus.bernardino@usp.br>
- Date
- Sep 18, 2019, 01:56 UTC
- Message-ID
- <cac0c5a8979d45225436f310660f6fcf4d0bd7e7.1568771073.git.matheus.bernardino@usp.br>
- In-Reply-To
- <cover.1568771073.git.matheus.bernardino@usp.br>
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.bernardino@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