]> git.ipfire.org Git - thirdparty/git.git/commit
t/helper/ref-store: initialize oid in resolve-ref
authorHan-Wen Nienhuys <hanwen@google.com>
Mon, 31 May 2021 16:56:17 +0000 (16:56 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Jun 2021 01:01:54 +0000 (10:01 +0900)
commit0221eb86782bdd2cbbe9d6223d7ac9bcb61961b1
tree373491f064fdbea4de26dad5789b5bd954d90fba
parent230356ba704fc36e848e94b13c5b92acfa4c6fc6
t/helper/ref-store: initialize oid in resolve-ref

This will print $ZERO_OID when asking for a non-existent ref from the
test-helper.

Since resolve-ref provides direct access to refs_resolve_ref_unsafe(), it
provides a reliable mechanism for accessing REFNAME, while avoiding the implicit
resolution to refs/heads/REFNAME.

Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-ref-store.c