mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 18:38:58 +00:00
Added creation of 'objects/info' and 'objects/pack' directories.
This commit is contained in:
parent
2e29957a79
commit
8ea2c83b5d
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user