From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Han-Wen Nienhuys <hanwen@google.com>
Cc: git <git@vger.kernel.org>
Subject: Re: errno oversight
Date: Wed, 08 Dec 2021 13:47:51 +0100 [thread overview]
Message-ID: <211208.86sfv3l0op.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <CAFQ2z_NHXKss4LVBAFVpE7LFXt2OeOz9P9wi-z8riwHXWDb28w@mail.gmail.com>
On Wed, Dec 08 2021, Han-Wen Nienhuys wrote:
> In refs.c in origin/next and origin/seen, we have the following fragment:
It's in "master".
> if (refs_read_raw_ref(refs, refname, oid, &sb_refname,
> &read_flags, failure_errno)) {
> *flags |= read_flags;
> if (errno)
> *failure_errno = errno;
>
> overwriting failure_errno looks like an oversight?
This is from my ef18119dec8 (refs API: add a version of
refs_resolve_ref_unsafe() with "errno", 2021-10-16).
I don't see the bug here, overwriting *failure_errno is the point of
that variable. We're keeping the right errno value right after a
failure, and passing it up to our caller.
next prev parent reply other threads:[~2021-12-08 12:51 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 11:38 errno oversight Han-Wen Nienhuys
2021-12-08 12:47 ` Ævar Arnfjörð Bjarmason [this message]
2021-12-08 13:00 ` Ævar Arnfjörð Bjarmason
2021-12-08 19:02 ` Junio C Hamano
2021-12-09 5:02 ` [PATCH 0/3] refs: ab/refs-errno-cleanup fixup + remove "failure_errno" Ævar Arnfjörð Bjarmason
2021-12-09 5:02 ` [PATCH 1/3] refs API: use "failure_errno", not "errno" Ævar Arnfjörð Bjarmason
2021-12-09 5:02 ` [PATCH 2/3] sequencer: don't use die_errno() on refs_resolve_ref_unsafe() failure Ævar Arnfjörð Bjarmason
2021-12-09 5:02 ` [PATCH 3/3] refs API: remove "failure_errno" from refs_resolve_ref_unsafe() Ævar Arnfjörð Bjarmason
2021-12-12 19:53 ` [PATCH v2 0/3] refs: ab/refs-errno-cleanup fixup + remove "failure_errno" Ævar Arnfjörð Bjarmason
2021-12-12 19:53 ` [PATCH v2 1/3] refs API: use "failure_errno", not "errno" Ævar Arnfjörð Bjarmason
2021-12-12 19:53 ` [PATCH v2 2/3] sequencer: don't use die_errno() on refs_resolve_ref_unsafe() failure Ævar Arnfjörð Bjarmason
2021-12-12 19:53 ` [PATCH v2 3/3] refs API: remove "failure_errno" from refs_resolve_ref_unsafe() Ævar Arnfjörð Bjarmason
2022-01-12 12:36 ` [PATCH v3 0/3] For v2.35.0: refs: ab/refs-errno-cleanup fixup + remove "failure_errno" Ævar Arnfjörð Bjarmason
2022-01-12 12:36 ` [PATCH v3 1/3] refs API: use "failure_errno", not "errno" Ævar Arnfjörð Bjarmason
2022-01-12 19:59 ` Junio C Hamano
2022-01-13 12:14 ` Ævar Arnfjörð Bjarmason
2022-01-12 12:36 ` [PATCH v3 2/3] sequencer: don't use die_errno() on refs_resolve_ref_unsafe() failure Ævar Arnfjörð Bjarmason
2022-01-12 20:02 ` Junio C Hamano
2022-01-12 12:36 ` [PATCH v3 3/3] refs API: remove "failure_errno" from refs_resolve_ref_unsafe() Ævar Arnfjörð Bjarmason
2022-01-12 19:34 ` [PATCH v3 0/3] For v2.35.0: refs: ab/refs-errno-cleanup fixup + remove "failure_errno" Junio C Hamano
2022-01-13 12:22 ` Ævar Arnfjörð Bjarmason
2022-01-13 18:54 ` Junio C Hamano
2022-01-14 12:21 ` Ævar Arnfjörð Bjarmason
2022-01-26 14:36 ` [PATCH v4 0/2] refs: remove the last use of "errno" from the public API Ævar Arnfjörð Bjarmason
2022-01-26 14:37 ` [PATCH v4 1/2] sequencer: don't use die_errno() on refs_resolve_ref_unsafe() failure Ævar Arnfjörð Bjarmason
2022-01-26 23:57 ` Junio C Hamano
2022-01-26 14:37 ` [PATCH v4 2/2] refs API: remove "failure_errno" from refs_resolve_ref_unsafe() Ævar Arnfjörð Bjarmason
2021-12-08 13:05 ` errno oversight Han-Wen Nienhuys
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=211208.86sfv3l0op.gmgdl@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=hanwen@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).