Jeff King <peff@xxxxxxxx> 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