author | Jason Riedy <ejr@EECS.Berkeley.EDU> | |
Fri, 10 Feb 2006 01:56:13 +0000 (17:56 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 10 Feb 2006 02:38:52 +0000 (18:38 -0800) | ||
commit | 67d42212ff104aaafa97b943cb369b8444f61581 | |
tree | bb274c269ed074409f0119690ddf788ee9a1b797 | tree | snapshot |
parent | ce1610ead63221738225c415300f3d32620ced04 | commit | diff |
stat() for existence in safe_create_leading_directories()
Use stat() to explicitly check for existence rather than
relying on the non-portable EEXIST error in sha1_file.c's
safe_create_leading_directories(). There certainly are
optimizations possible, but then the code becomes almost
the same as that in coreutil's lib/mkdir-p.c.
Other uses of EEXIST seem ok. Tested on Solaris 8, AIX 5.2L,
and a few Linux versions. AIX has some unrelated (I think)
failures right now; I haven't tried many recent gits there.
Anyone have an old Ultrix box to break everything? ;)
Also remove extraneous #includes. Everything's already in
git-compat-util.h, included through cache.h.
Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Use stat() to explicitly check for existence rather than
relying on the non-portable EEXIST error in sha1_file.c's
safe_create_leading_directories(). There certainly are
optimizations possible, but then the code becomes almost
the same as that in coreutil's lib/mkdir-p.c.
Other uses of EEXIST seem ok. Tested on Solaris 8, AIX 5.2L,
and a few Linux versions. AIX has some unrelated (I think)
failures right now; I haven't tried many recent gits there.
Anyone have an old Ultrix box to break everything? ;)
Also remove extraneous #includes. Everything's already in
git-compat-util.h, included through cache.h.
Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c | diff | blob | history |