]> git.ipfire.org Git - thirdparty/git.git/commit
midx: use real paths in lookup_multi_pack_index()
authorDerrick Stolee <derrickstolee@github.com>
Mon, 25 Apr 2022 18:27:12 +0000 (18:27 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Apr 2022 18:31:11 +0000 (11:31 -0700)
commiteafcc6de5296f6afc67fdc98101ae51959203ad8
tree53cd3c70d6e8a99219b61939e65d2c8256eb25ea
parentd516b2db0af2221bd6b13e7347abdcb5830b2829
midx: use real paths in lookup_multi_pack_index()

This helper looks for a parsed multi-pack-index whose object directory
matches the given object_dir. Before going into the loop over the parsed
multi-pack-indexes, it calls find_odb() to ensure that the given
object_dir is actually a known object directory.

However, find_odb() uses real-path manipulations to compare the input to
the alternate directories. This same real-path comparison is not used in
the loop, leading to potential issues with the strcmp().

Update the method to use the real-path values instead.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
midx.c