Subject: Re: [PATCH] wrapper: Fix a errno discrepancy on NetBSD.

From: Collin Funk <[email-masked]>
Date: Sat, 03 May 2025 11:56:19 -0700

Jeff King <[email-masked]> writes:

> I dunno. I don't mind making errno returns more consistent to prevent a
> future foot-gun, but I think as a general rule we may be better off not
> looking too hard at errno for exotic conditions.

I generally agree. But in this case FreeBSD only sets errno to EMLINK in
this specific case and the only other case NetBSD sets errno to EFTYPE
is when the O_REGULAR flag is used and the path is not a regular file.
Using 'grep -r O_REGULAR' confirms it is never used in git, and since it
is a NetBSD extension I doubt it will ever be used. So not an exotic
case, in my opinion.

Thanks,
Collin