diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2010-12-19 15:08:53 +0100 |
|---|---|---|
| committer | nulltoken <emeric.fermas@gmail.com> | 2010-12-19 15:08:53 +0100 |
| commit | 1c2c7c0d1663bcdd279a0a73f6673ab5f81f7ec5 (patch) | |
| tree | 870d4e2e6ccbe7302973f1c5d0a5457297fd8ab3 /src | |
| parent | 2899093835b3aac641e594f717142fcce065c479 (diff) | |
| download | libgit2-1c2c7c0d1663bcdd279a0a73f6673ab5f81f7ec5.tar.gz | |
Added creation of ref/heads/ and refs/tags/ directories.
Diffstat (limited to 'src')
| -rw-r--r-- | src/repository.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/repository.c b/src/repository.c index 0759c0c26..94f67f497 100644 --- a/src/repository.c +++ b/src/repository.c @@ -41,6 +41,7 @@ #define GIT_SYMREF "ref: " #define GIT_REFS_HEADS "refs/heads/" +#define GIT_REFS_TAGS "refs/tags/" #define GIT_BRANCH_MASTER "master" static const int default_table_size = 32; @@ -806,6 +807,16 @@ int git_repository_init__create_structure_or_reinit(git_repository_init_results* if (gitfo_mkdir(temp_path, mode)) return GIT_ERROR; + /* Creates the '/refs/heads/' directory */ + strcpy(temp_path + path_len, GIT_REFS_HEADS); + if (gitfo_mkdir(temp_path, mode)) + return GIT_ERROR; + + /* Creates the '/refs/tags/' directory */ + strcpy(temp_path + path_len, GIT_REFS_TAGS); + if (gitfo_mkdir(temp_path, mode)) + return GIT_ERROR; + /* To be implemented */ |
