From 829a321569d8e8f2c582aef9f0c990df976ab842 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 20 Aug 2018 18:24:34 +0000 Subject: commit-graph: close_commit_graph before shallow walk Call close_commit_graph() when about to start a rev-list walk that includes shallow commits. This is necessary in code paths that "fake" shallow commits for the sake of fetch. Specifically, test 351 in t5500-fetch-pack.sh runs git fetch --shallow-exclude one origin with a file-based transfer. When the "remote" has a commit-graph, we do not prevent the commit-graph from being loaded, but then the commits are intended to be dynamically transferred into shallow commits during get_shallow_commits_by_rev_list(). By closing the commit-graph before this call, we prevent this interaction. Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- commit-graph.h | 1 + 1 file changed, 1 insertion(+) (limited to 'commit-graph.h') diff --git a/commit-graph.h b/commit-graph.h index 76e098934a..13d736cdde 100644 --- a/commit-graph.h +++ b/commit-graph.h @@ -59,6 +59,7 @@ void write_commit_graph(const char *obj_dir, int verify_commit_graph(struct repository *r, struct commit_graph *g); +void close_commit_graph(struct repository *); void free_commit_graph(struct commit_graph *); #endif -- cgit v1.2.3