]> git.ipfire.org Git - thirdparty/git.git/commit - commit-graph.h
commit-graph.h: use odb in 'load_commit_graph_one_fd_st'
authorTaylor Blau <me@ttaylorr.com>
Mon, 3 Feb 2020 21:18:04 +0000 (13:18 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Feb 2020 19:36:51 +0000 (11:36 -0800)
commita7df60cac834cb7f91c3463205c2b6ba5e694200
treef01d5060ce47a0e049a520a72c105a367f13cbde
parentad2dd5bb63b6c2da0091d63463e29ae27e47a893
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>
builtin/commit-graph.c
commit-graph.c
commit-graph.h
t/helper/test-read-graph.c