]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/index-pack.c
object API users + docs: check <0, not !0 with check_object_signature()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 4 Feb 2022 23:48:29 +0000 (00:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 26 Feb 2022 01:16:31 +0000 (17:16 -0800)
commitee213de22d15e801ba3712be0cb8ecbf7415fa1d
treec6f0cb0706e64e4d9fe00cb5fda4cd133e743767
parentcdcaaec9a6028f53f9b44efb6dce9f15bb394b45
object API users + docs: check <0, not !0 with check_object_signature()

Change those users of the object API that misused
check_object_signature() by assuming it returned any non-zero when the
OID didn't match the expected value to check <0 instead. In practice
all of this code worked before, but it wasn't consistent with rest of
the users of the API.

Let's also clarify what the <0 return value means in API docs.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/index-pack.c
builtin/mktag.c
cache.h
object-file.c
pack-check.c