Dennis Stosberg [off-list ref] writes:
lock_ref_sha1_basic relies on errno beeing set to EISDIR by the
call to read() in resolve_ref() to detect directories. But calling
read() on a directory under NetBSD returns EPERM, and even succeeds
for local filesystems on FreeBSD.
Signed-off-by: Dennis Stosberg <redacted>
Thanks.
I've always wondered about the code that follows where you
patched. It relies on either open() on a directory to fail, or
read() from a file descriptor to return something other than
what starts with 40-byte hexadecimal (or "ref: blah") to skip
directories.
You might probably meant the patch primarily to fix the leftover
empty directories issue in "next", but it is also the right
thing to do for "master" (and even for "maint"), I think.
I'll apply it to "master" and then merge it into "next".