[PATCH v6? 13/17] refs API: make refs_resolve_refdup() not set errno

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move refs_resolve_refdup() from the legacy refs_resolve_ref_unsafe()
to the new refs_resolve_ref_unsafe_with_errno(). I have read its
callers and determined that they don't care about errno being set.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
---
 refs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/refs.c b/refs.c
index 214f3f4f79f..45b51c0a532 100644
--- a/refs.c
+++ b/refs.c
@@ -287,9 +287,11 @@ 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_resolve_ref_unsafe_with_errno(refs, refname,
+						    resolve_flags, oid, flags,
+						    &ignore_errno);
 	return xstrdup_or_null(result);
 }
 
-- 
2.32.0-dev




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux