summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2010-12-20 16:46:13 +0100
committernulltoken <emeric.fermas@gmail.com>2010-12-20 16:46:13 +0100
commit8ea2c83b5d21a8a15075943eba822b9ca928af3e (patch)
tree16aeb38f1c076db0e28ed17b174c402a2898b839 /src
parent2e29957a79592959c7b297722618536f8d977e88 (diff)
downloadlibgit2-8ea2c83b5d21a8a15075943eba822b9ca928af3e.tar.gz
Added creation of 'objects/info' and 'objects/pack' directories.
Diffstat (limited to 'src')
-rw-r--r--src/repository.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/repository.c b/src/repository.c
index 3551b8796..4ef4b1fc0 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -35,7 +35,8 @@
#define GIT_DIR "/.git/"
#define GIT_OBJECTS_DIR "objects/"
-#define GIT_REFS_DIR "refs/"
+#define GIT_OBJECTS_INFO_DIR "objects/info/"
+#define GIT_OBJECTS_PACK_DIR "objects/pack/"
#define GIT_REFS_HEADS_DIR "refs/heads/"
#define GIT_REFS_TAGS_DIR "refs/tags/"
@@ -786,19 +787,19 @@ int repo_init_structure(repo_init *results)
if (repo_init_createhead(temp_path) < GIT_SUCCESS)
return GIT_ERROR;
- /* Creates the '/objects/' directory */
- strcpy(temp_path + path_len, GIT_OBJECTS_DIR);
- if (gitfo_mkdir(temp_path, mode))
+ /* Creates the '/objects/info/' directory */
+ strcpy(temp_path + path_len, GIT_OBJECTS_INFO_DIR);
+ if (gitfo_mkdir_recurs(temp_path, mode))
return GIT_ERROR;
- /* Creates the '/refs/' directory */
- strcpy(temp_path + path_len, GIT_REFS_DIR);
+ /* Creates the '/objects/pack/' directory */
+ strcpy(temp_path + path_len, GIT_OBJECTS_PACK_DIR);
if (gitfo_mkdir(temp_path, mode))
return GIT_ERROR;
/* Creates the '/refs/heads/' directory */
strcpy(temp_path + path_len, GIT_REFS_HEADS_DIR);
- if (gitfo_mkdir(temp_path, mode))
+ if (gitfo_mkdir_recurs(temp_path, mode))
return GIT_ERROR;
/* Creates the '/refs/tags/' directory */