From dade47c06cf849b0ca180a8e6383b55ea6f75812 Mon Sep 17 00:00:00 2001 From: Jonathan Tan Date: Wed, 11 Jul 2018 15:42:42 -0700 Subject: commit-graph: add repo arg to graph readers Add a struct repository argument to the functions in commit-graph.h that read the commit graph. (This commit does not affect functions that write commit graphs.) Because the commit graph functions can now read the commit graph of any repository, the global variable core_commit_graph has been removed. Instead, the config option core.commitGraph is now read on the first time in a repository that a commit is attempted to be parsed using its commit graph. This commit includes a test that exercises the functionality on an arbitrary repository that is not the_repository. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- ref-filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ref-filter.c') diff --git a/ref-filter.c b/ref-filter.c index 49021ee4467..9b2da883926 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -1713,7 +1713,7 @@ static enum contains_result contains_tag_algo(struct commit *candidate, for (p = want; p; p = p->next) { struct commit *c = p->item; - load_commit_graph_info(c); + load_commit_graph_info(the_repository, c); if (c->generation < cutoff) cutoff = c->generation; } -- cgit v1.2.3