Thread (135 messages) flat view 135 messages, 4 authors, 2021-08-23

Re: [PATCH v5 5/6] refs: explicitly return failure_errno from parse_loose_ref_contents

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-07-11 12:47:21

On Wed, Jul 07 2021, Han-Wen Nienhuys via GitGitGadget wrote:
Subject: refs: explicitly return failure_errno from parse_loose_ref_contents
[...]
The EINVAL error from parse_loose_ref_contents is used in files-backend
to create a custom error message.
Except as my https://lore.kernel.org/git/87v95o5ku8.fsf@evledraar.gmail.com/ (local) shows, and if you remove this:
+	ret = parse_loose_ref_contents(buf, oid, referent, type, failure_errno);
+	errno = *failure_errno;
We aren't explicitly returning things yet, instead we set it for some,
but others still fail if we don't support that one caller relying on
this "errno" and not "failure_errno" through the backdoor, why not
simply convert that remaining caller?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help