Re: [PATCH] refs: print errno for read_raw_ref if GIT_TRACE_REFS is set
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 13, 2021, 20:08 UTC
- Message-ID
- <xmqqy2dmkkvo.fsf@gitster.g>
- In-Reply-To
- <CAFQ2z_MnZOfo4Bt6SsRJnL+F70r9wr_jYSf2KGvcvyX-8PfVRQ@mail.gmail.com>
Han-Wen Nienhuys <hanwen@google.com> writes:
Show 5 quoted lines
>> 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.