]> git.ipfire.org Git - thirdparty/git.git/commit
object-name: allow skipping ambiguity checks in `get_oid()` family
authorPatrick Steinhardt <ps@pks.im>
Wed, 12 Mar 2025 15:56:08 +0000 (16:56 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Mar 2025 18:31:16 +0000 (11:31 -0700)
commit46a2b52240ef687ad4c9d2aec4317796704c991a
treef55a12ae7e3eaf3970aad8cf0a443139279f204b
parent37e7546b91fb7d7c263d809dbf7d85831c15cc4f
object-name: allow skipping ambiguity checks in `get_oid()` family

When reading an object ID via `get_oid_basic()` or any of its related
functions we perform a check whether the object ID is ambiguous, which
can be the case when a reference with the same name exists. While the
check is generally helpful, there are cases where it only adds to the
runtime overhead without providing much of a benefit.

Add a new flag that allows us to disable the check. The flag will be
used in a subsequent commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hash.h
object-name.c