Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2020-02-04 00:18:04 +0300
committerJunio C Hamano <gitster@pobox.com>2020-02-04 22:36:51 +0300
commita7df60cac834cb7f91c3463205c2b6ba5e694200 (patch)
treef01d5060ce47a0e049a520a72c105a367f13cbde /builtin/commit-graph.c
parentad2dd5bb63b6c2da0091d63463e29ae27e47a893 (diff)
commit-graph.h: use odb in 'load_commit_graph_one_fd_st'
Apply a similar treatment as in the previous patch to pass a 'struct object_directory *' through the 'load_commit_graph_one_fd_st' initializer, too. This prevents a potential bug where a pointer comparison is made to a NULL 'g->odb', which would cause the commit-graph machinery to think that a pair of commit-graphs belonged to different alternates when in fact they do not (i.e., in the case of no '--object-dir'). Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
-rw-r--r--builtin/commit-graph.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
index e622ed90b89..4a70b33fb5f 100644
--- a/builtin/commit-graph.c
+++ b/builtin/commit-graph.c
@@ -96,7 +96,7 @@ static int graph_verify(int argc, const char **argv)
FREE_AND_NULL(graph_name);
if (open_ok)
- graph = load_commit_graph_one_fd_st(fd, &st);
+ graph = load_commit_graph_one_fd_st(fd, &st, odb);
else
graph = read_commit_graph_one(the_repository, odb);