From: Ævar Arnfjörð Bjarmason Date: Sat, 16 Oct 2021 09:39:20 +0000 (+0200) Subject: refs tests: ignore ignore errno in test-ref-store helper X-Git-Tag: v2.35.0-rc0~135^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6846f7248d2915e534eebf1457600b83573f981d;p=thirdparty%2Fgit.git refs tests: ignore ignore errno in test-ref-store helper 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 Signed-off-by: Junio C Hamano --- diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c index b314b81a45..2f91fb9b22 100644 --- a/t/helper/test-ref-store.c +++ b/t/helper/test-ref-store.c @@ -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; }