diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-10-16 11:39:21 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-16 11:17:03 -0700 |
commit | f65bb9fb06f969e8fb89de2d6dc9218f13cb361c (patch) | |
tree | 990d9977bfd7eb31ed2715577d7daff1e729338b /refs.c | |
parent | 6846f7248d2915e534eebf1457600b83573f981d (diff) | |
download | git-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); } |