On Wed, Mar 6, 2024 at 8:57 AM Junio C Hamano <gitster@xxxxxxxxx> wrote: > >> + 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.