Code

lock_ref_sha1_basic does not remove empty directories on BSD
authorDennis Stosberg <dennis@stosberg.net>
Mon, 2 Oct 2006 17:23:53 +0000 (19:23 +0200)
committerJunio C Hamano <junkio@cox.net>
Tue, 3 Oct 2006 08:02:27 +0000 (01:02 -0700)
commitcb626bc6300c988d066aacc53a3f5893ee5dba53
treecbe93652257036afd5ce59052c6e76cbe7430a8a
parentf5961572a02ef08324f297fe93b704ff2137e5a6
lock_ref_sha1_basic does not remove empty directories on BSD

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 <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
refs.c