[PATCH v2 14/21] refs tests: ignore ignore errno in test-ref-store helper
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Oct 16, 2021, 09:39 UTC
- Message-ID
- <patch-v2-14.21-1289d78e4f3-20211016T093845Z-avarab@gmail.com>
- In-Reply-To
- <cover-v2-00.21-00000000000-20211016T093845Z-avarab@gmail.com>
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> --- t/helper/test-ref-store.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c index b314b81a45b..2f91fb9b227 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; }
-- 2.33.1.1338.g20da966911a