All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Han-Wen Nienhuys <hanwen@google.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 13:08:43 -0700	[thread overview]
Message-ID: <xmqqy2dmkkvo.fsf@gitster.g> (raw)
In-Reply-To: <CAFQ2z_MnZOfo4Bt6SsRJnL+F70r9wr_jYSf2KGvcvyX-8PfVRQ@mail.gmail.com> (Han-Wen Nienhuys's message of "Tue, 13 Apr 2021 13:58:42 +0200")

Han-Wen Nienhuys <hanwen@google.com> writes:

>> I do wonder if we want strerror(errno) instead of the number, but I
>> can go either way (it's just a trace output).
>
> For tracing, it would be most useful if we got the actual symbol (eg.
> ENOENT). Is there a way to get at that?

I do not think there is.

And that is the reason why we see everywhere calls to die_errno(),
error(..., strerror(errno)), etc.

As this is interpolated into trace with untranslated string,
I suspect that strerror() is not a good match, so let's live with %d
for now.

Thanks.



  parent reply	other threads:[~2021-04-13 20:08 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
2021-04-13 20:08     ` Junio C Hamano [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqy2dmkkvo.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=hanwen@google.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.