summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-16 11:39:21 +0200
committerJunio C Hamano <gitster@pobox.com>2021-10-16 11:17:03 -0700
commitf65bb9fb06f969e8fb89de2d6dc9218f13cb361c (patch)
tree990d9977bfd7eb31ed2715577d7daff1e729338b /refs.c
parent6846f7248d2915e534eebf1457600b83573f981d (diff)
downloadgit-f65bb9fb06f969e8fb89de2d6dc9218f13cb361c.tar.gz
refs API: make refs_resolve_refdup() not set errno
Move refs_resolve_refdup() from the legacy refs_resolve_ref_unsafe() to the new refs_werrres_ref_unsafe(). I have read its callers and determined that they don't care about errno being set. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/refs.c b/refs.c
index dc6ed56149..09452b5e41 100644
--- a/refs.c
+++ b/refs.c
@@ -268,9 +268,10 @@ char *refs_resolve_refdup(struct ref_store *refs,
struct object_id *oid, int *flags)
{
const char *result;
+ int ignore_errno;
- result = refs_resolve_ref_unsafe(refs, refname, resolve_flags,
- oid, flags);
+ result = refs_werrres_ref_unsafe(refs, refname, resolve_flags,
+ oid, flags, &ignore_errno);
return xstrdup_or_null(result);
}