Skip to content

Commit 096a7fb

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent db7a3d2 commit 096a7fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

refs/files-backend.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,11 @@ static void loose_fill_ref_dir(struct ref_store *ref_store,
280280
create_dir_entry(dir->cache, refname.buf,
281281
refname.len));
282282
} else {
283-
if (!refs_resolve_ref_unsafe(&refs->base,
283+
int ignore_errno;
284+
if (!refs_werrres_ref_unsafe(&refs->base,
284285
refname.buf,
285286
RESOLVE_REF_READING,
286-
&oid, &flag)) {
287+
&oid, &flag, &ignore_errno)) {
287288
oidclr(&oid);
288289
flag |= REF_ISBROKEN;
289290
} else if (is_null_oid(&oid)) {

0 commit comments

Comments
 (0)