Re: [PATCH v5 5/6] refs: explicitly return failure_errno from parse_loose_ref_contents
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jul 11, 2021, 12:41 UTC
- Message-ID
- <87czrp3tm4.fsf@evledraar.gmail.com>
- In-Reply-To
- <6918c214d1b41b16c47625f0935389440253ec4c.1625684869.git.gitgitgadget@gmail.com>
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/ 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?