Merge branch 'lj/refs' into next

* lj/refs:
  lock_ref_sha1_basic does not remove empty directories on BSD
This commit is contained in:
Junio C Hamano
2006-10-03 01:07:05 -07:00

6
refs.c
View File

@@ -234,6 +234,12 @@ const char *resolve_ref(const char *ref, unsigned char *sha1, int reading, int *
}
}
/* Is it a directory? */
if (S_ISDIR(st.st_mode)) {
errno = EISDIR;
return NULL;
}
/*
* Anything else, just open it and try to use it as
* a ref