From: Han-Wen Nienhuys <hanwen@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Han-Wen Nienhuys via GitGitGadget <gitgitgadget@gmail.com>,
git <git@vger.kernel.org>, Han-Wen Nienhuys <hanwenn@gmail.com>
Subject: Re: [PATCH] refs: print errno for read_raw_ref if GIT_TRACE_REFS is set
Date: Tue, 13 Apr 2021 14:02:25 +0200 [thread overview]
Message-ID: <CAFQ2z_OMUdi4D3Jg3rsPr_Q-VeRptdiEOiYOL2kmyuBuvZLCjg@mail.gmail.com> (raw)
In-Reply-To: <CAFQ2z_MnZOfo4Bt6SsRJnL+F70r9wr_jYSf2KGvcvyX-8PfVRQ@mail.gmail.com>
On Tue, Apr 13, 2021 at 1:58 PM Han-Wen Nienhuys <hanwen@google.com> wrote:
>
> On Mon, Apr 12, 2021 at 11:45 PM Junio C Hamano <gitster@pobox.com> wrote:
> > > @@ -251,7 +252,9 @@ static int debug_read_raw_ref(struct ref_store *ref_store, const char *refname,
> > > trace_printf_key(&trace_refs, "read_raw_ref: %s: %s (=> %s) type %x: %d\n",
> > > refname, oid_to_hex(oid), referent->buf, *type, res);
> > > } else {
> > > - trace_printf_key(&trace_refs, "read_raw_ref: %s: %d\n", refname, res);
> > > + trace_printf_key(&trace_refs,
> > > + "read_raw_ref: %s: %d (errno %d)\n", refname,
> > > + res, errno);
> > > }
> >
> > OK. Between trace_printf_key() and the return of the call to
> > read_raw_ref() method of the ref backend is only an "if (res == 0)"
> > condition and I do not see anything that might clobber errno.
>
> I don't want to bet on that. Let me send a second round.
oh, ugh. In email, there are two calls, but one is prefixed with '-'.
Nevertheless, a bit of paranoia doesn't hurt here.
--
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--
Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
next prev parent reply other threads:[~2021-04-13 12:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 19:32 [PATCH] refs: print errno for read_raw_ref if GIT_TRACE_REFS is set Han-Wen Nienhuys via GitGitGadget
2021-04-12 21:45 ` Junio C Hamano
2021-04-13 11:58 ` Han-Wen Nienhuys
2021-04-13 12:02 ` Han-Wen Nienhuys [this message]
2021-04-13 20:08 ` Junio C Hamano
2021-04-23 8:34 ` Han-Wen Nienhuys
2021-04-13 12:10 ` [PATCH v2] " Han-Wen Nienhuys via GitGitGadget
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=CAFQ2z_OMUdi4D3Jg3rsPr_Q-VeRptdiEOiYOL2kmyuBuvZLCjg@mail.gmail.com \
--to=hanwen@google.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=hanwenn@gmail.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).