summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-16 11:39:16 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-10-16 11:17:03 -0700
commit096a7fbb97dc4015c97b1811aab4e08e2f0ac724 (patch)
tree05bc0b8f660721ff604d601191a2b92193075774 /refs
parentrefs API: make resolve_gitlink_ref() not set errno (diff)
downloadtgif-096a7fbb97dc4015c97b1811aab4e08e2f0ac724.tar.xz
refs API: make loose_fill_ref_dir() not set errno
Change the refs_resolve_ref_unsafe() invoked in loose_fill_ref_dir() to a form that ignores errno. The only eventual caller of this function is create_ref_cache(), whose callers in turn don't have their failure depend on any errno set here. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 482d04de03..759c21e88a 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -280,10 +280,11 @@ static void loose_fill_ref_dir(struct ref_store *ref_store,
create_dir_entry(dir->cache, refname.buf,
refname.len));
} else {
- if (!refs_resolve_ref_unsafe(&refs->base,
+ int ignore_errno;
+ if (!refs_werrres_ref_unsafe(&refs->base,
refname.buf,
RESOLVE_REF_READING,
- &oid, &flag)) {
+ &oid, &flag, &ignore_errno)) {
oidclr(&oid);
flag |= REF_ISBROKEN;
} else if (is_null_oid(&oid)) {