oid_pos(): access table through const pointers
authorJeff King <peff@peff.net>
Thu, 28 Jan 2021 06:20:23 +0000 (01:20 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Jan 2021 20:03:26 +0000 (12:03 -0800)
commit8380dcd700e80cd22745bcffb3625f90f943950c
treea4ab3fcfe1f8b98af53592eaedd64f7b07eb4dff
parent45ee13b942b26925b33d827bda2856e1ed0af0b7
oid_pos(): access table through const pointers

When we are looking up an oid in an array, we obviously don't need to
write to the array. Let's mark it as const in the function interfaces,
as well as in the local variables we use to derference the void pointer
(note a few cases use pointers-to-pointers, so we mark everything
const).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/name-rev.c
commit-graph.c
commit.c
hash-lookup.c
hash-lookup.h
oid-array.c
pack-bitmap-write.c