[RFC,1/3] diff: use the given repo at diff_populate_filespec()
diff mbox series

Message ID cac0c5a8979d45225436f310660f6fcf4d0bd7e7.1568771073.git.matheus.bernardino@usp.br
State New
Headers show
Series
  • grep: don't add subrepos to in-memory alternates
Related show

Commit Message

Matheus Tavares Bernardino Sept. 18, 2019, 1:56 a.m. UTC
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(-)

Patch
diff mbox series

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;