From b2cb94254be7bf8b44c851897dd29a00ce654e3c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 6 Jul 2005 01:11:52 -0700 Subject: [PATCH] clone-pack.c:write_one_ref() - Create leading directories. The function write_one_ref() is passed the list of refs received from the other end, which was obtained by directory traversal under $GIT_DIR/refs; this can contain paths other than what git-init-db prepares and would fail to clone when there is such. Signed-off-by: Junio C Hamano Signed-off-by: Linus Torvalds --- cache.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index cc7b6db4b3..18584c99cf 100644 --- a/cache.h +++ b/cache.h @@ -161,6 +161,8 @@ extern void rollback_index_file(struct cache_file *); extern char *git_path(const char *fmt, ...); extern char *sha1_file_name(const unsigned char *sha1); +int safe_create_leading_directories(char *path); + /* Read and unpack a sha1 file into memory, write memory to a sha1 file */ extern void * map_sha1_file(const unsigned char *sha1, unsigned long *size); extern int unpack_sha1_header(z_stream *stream, void *map, unsigned long mapsize, void *buffer, unsigned long size); -- cgit v1.2.3