]> git.ipfire.org Git - thirdparty/git.git/commitdiff
refs tests: ignore ignore errno in test-ref-store helper
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 16 Oct 2021 09:39:20 +0000 (11:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 16 Oct 2021 18:17:03 +0000 (11:17 -0700)
The cmd_resolve_ref() function has always ignored errno on failure,
but let's do so explicitly when using the refs_resolve_ref_unsafe()
function.

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

index b314b81a45b27cac548e1c5628f3dd96685ceb09..2f91fb9b227d352074b7a6b325ab8be81f3fbfe6 100644 (file)
@@ -123,9 +123,10 @@ static int cmd_resolve_ref(struct ref_store *refs, const char **argv)
        int resolve_flags = arg_flags(*argv++, "resolve-flags");
        int flags;
        const char *ref;
+       int ignore_errno;
 
-       ref = refs_resolve_ref_unsafe(refs, refname, resolve_flags,
-                                     &oid, &flags);
+       ref = refs_werrres_ref_unsafe(refs, refname, resolve_flags,
+                                     &oid, &flags, &ignore_errno);
        printf("%s %s 0x%x\n", oid_to_hex(&oid), ref ? ref : "(null)", flags);
        return ref ? 0 : 1;
 }