From eb33876c262bec79a127b82a3a853ad00665d894 Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 10 Nov 2015 12:42:38 +0100 Subject: initdb: make safe_create_dir public Soon we will want to create initdb functions for ref backends, and code from initdb that calls this function needs to move into the files backend. So this function needs to be public. Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Michael Haggerty Signed-off-by: Jeff King --- cache.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 3ba0b8f3d..4e13ddb19 100644 --- a/cache.h +++ b/cache.h @@ -1747,4 +1747,12 @@ void stat_validity_update(struct stat_validity *sv, int fd); int versioncmp(const char *s1, const char *s2); void sleep_millisec(int millisec); +/* + * Create a directory and (if share is nonzero) adjust its permissions + * according to the shared_repository setting. Only use this for + * directories under $GIT_DIR. Don't use it for working tree + * directories. + */ +void safe_create_dir(const char *dir, int share); + #endif /* CACHE_H */ -- cgit v1.2.1