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

Re: [RFC PATCH 1/3] Make read_gitfile and resolve_gitfile thread safe

From
ANAtneya Nair <atneya@google.com>
Date
Mar 12, 2024, 20:44 UTC
Message-ID
<CA+D9mTFLehceHtO+_3w4pCW+XKNx1FjxJv_qR+sfwR94kPJMVw@mail.gmail.com>
In-Reply-To
<xmqqttljs3he.fsf@gitster.g>
On Wed, Mar 6, 2024 at 8:57 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> >> +    if (!path) die(_("Unexpected null from realpath '%s'"), dir);
> >
> > In fact, this is not a null path, but an empty path (null is not part of
> > the string).
> > By the way, shouldn't this be an internal bug instead of a message to
> > the user?
>
> Unless the strbuf instance the result_buf pointer points at is
> corrupt, its .buf member should *NEVER* be NULL.  Testing for NULL
> is meaningless, unless you are manually futzing with the members of
> strbuf (you shouldn't).
>
> Thanks for carefully reading.
>
Thanks for pointing this out, I fixed this issue in v2.
Previous: Junio C HamanoNext: Atneya Nair
Message 8 of 17 in “Parallel submodule status”
  1. 0/3 Parallel submodule statusAtneya Nair, Mar 5, 2024
  2. 1/3 Make read_gitfile and resolve_gitfile thread safeAtneya Nair, Mar 5, 2024
  3. Junio C HamanoMar 5, 2024
  4. Eric SunshineMar 5, 2024
  5. Atneya NairMar 12, 2024
  6. Jean-Noël AvilaMar 6, 2024
  7. Junio C HamanoMar 6, 2024
  8. Atneya NairMar 12, 2024
  9. 2/3 Make ce_compare_gitlink thread-safeAtneya Nair, Mar 5, 2024
  10. Junio C HamanoMar 5, 2024
  11. Junio C HamanoMar 5, 2024
  12. Jeff KingMar 6, 2024
  13. Junio C HamanoMar 6, 2024
  14. Atneya NairMar 12, 2024
  15. Atneya NairMar 12, 2024
  16. Junio C HamanoMar 13, 2024
  17. 3/3 Preload submodule state in refresh_indexAtneya Nair, Mar 5, 2024

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.