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>
Mon, 2 Oct 2006 18:49:45 +0000 (11:49 -0700)
commit7a21632fa346df58d94d32f09625025931ef13ec
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