git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] refs: print errno for read_raw_ref if GIT_TRACE_REFS is set

From
Han-Wen Nienhuys <hanwen@google.com>
Date
Apr 23, 2021, 08:34 UTC
Message-ID
<CAFQ2z_PhkOEnKNFZ29R5x9rttO+3POT8Tdx9stcQ__oNG=wQsA@mail.gmail.com>
In-Reply-To
<xmqqy2dmkkvo.fsf@gitster.g>
On Tue, Apr 13, 2021 at 10:08 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
>
> 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.
Great!
This topic is marked as

Waiting for reviews to conclude. cf. <xmqq4kgbb2ic.fsf@gitster.g>

but I don't know what is left to do. Oversight?
-- 
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
Previous: Junio C HamanoNext: Han-Wen Nienhuys via GitGitGadget
Message 6 of 7 in “refs: print errno for read_raw_ref if GIT_TRACE_REFS is set”
  1. refs: print errno for read_raw_ref if GIT_TRACE_REFS is setHan-Wen Nienhuys via GitGitGadget, Apr 12, 2021
  2. Junio C HamanoApr 12, 2021
  3. Han-Wen NienhuysApr 13, 2021
  4. Han-Wen NienhuysApr 13, 2021
  5. Junio C HamanoApr 13, 2021
  6. Han-Wen NienhuysApr 23, 2021
  7. refs: print errno for read_raw_ref if GIT_TRACE_REFS is setHan-Wen Nienhuys via GitGitGadget, Apr 13, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.