summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar David Turner <dturner@twopensource.com>2015-11-10 12:42:38 +0100
committerLibravatar Jeff King <peff@peff.net>2015-11-20 04:52:01 -0500
commiteb33876c262bec79a127b82a3a853ad00665d894 (patch)
treefe8f353bfc0a177d4df5c345cf005625778c97ee /builtin
parentrefs: split filesystem-based refs code into a new file (diff)
downloadtgif-eb33876c262bec79a127b82a3a853ad00665d894.tar.xz
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/init-db.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/builtin/init-db.c b/builtin/init-db.c
index f59f40768e..07229d60f1 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -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)
{