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 <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>
This commit is contained in:
@ -24,18 +24,6 @@ static int init_shared_repository = -1;
|
||||
static const char *init_db_template_dir;
|
||||
static const char *git_link;
|
||||
|
||||
static void safe_create_dir(const char *dir, int share)
|
||||
{
|
||||
if (mkdir(dir, 0777) < 0) {
|
||||
if (errno != EEXIST) {
|
||||
perror(dir);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else if (share && adjust_shared_perm(dir))
|
||||
die(_("Could not make %s writable by group"), dir);
|
||||
}
|
||||
|
||||
static void copy_templates_1(struct strbuf *path, struct strbuf *template,
|
||||
DIR *dir)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user