Re: errno oversight
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 8, 2021, 19:02 UTC
- Message-ID
- <xmqqo85q2a42.fsf@gitster.g>
- In-Reply-To
- <211208.86o85rl07m.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 8 quoted lines
>>> if (refs_read_raw_ref(refs, refname, oid, &sb_refname,
>>> &read_flags, failure_errno)) {
>>> *flags |= read_flags;
>>> if (errno)
>>> *failure_errno = errno;
> ...
> Urg, sorry. Yes obviously that should use the failure_errno from
> refs_read_raw_ref().Yeah, I was wondering about the same thing, "refs_read_raw_ref() takes the failure_errno pointer for stuffing errno there, doesn't it? does the caller need to do anything?".
> I'll submit a fix for this soon. There's some good post-cleanup to be > done here, it seems only one upstream caller of > refs_resolve_ref_unsafe() cares about the failure_errno currently (but I > didn't look into your reftable code).
Thanks.