Move refs_ref_exists 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, in particular:
git grep -W -w -e refs_ref_exists -e ref_exists
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
refs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
index c64ed6285a6..f2a56a216c3 100644
--- a/refs.c
+++ b/refs.c
@@ -308,7 +308,9 @@ int read_ref(const char *refname, struct object_id *oid)
int refs_ref_exists(struct ref_store *refs, const char *refname)
{
- return !!refs_resolve_ref_unsafe(refs, refname, RESOLVE_REF_READING, NULL, NULL);
+ int ignore_errno;
+ return !!refs_werrres_ref_unsafe(refs, refname, RESOLVE_REF_READING,
+ NULL, NULL, &ignore_errno);
}
int ref_exists(const char *refname)--
2.33.1.1346.g48288c3c089