diff options
Diffstat (limited to 'src/repository.c')
| -rw-r--r-- | src/repository.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/repository.c b/src/repository.c index 47884c937..e0927c077 100644 --- a/src/repository.c +++ b/src/repository.c @@ -648,6 +648,15 @@ static int repo_init_structure(repo_init *results) if (gitfo_mkdir_recurs(git_dir, mode)) return git__throw(GIT_ERROR, "Failed to initialize repository structure. Could not mkdir"); +#ifdef GIT_WIN32 + /* Hides the ".git" directory */ + if (!results->is_bare) { + error = gitfo_hide_directory__w32(git_dir); + if (error < GIT_SUCCESS) + return git__rethrow(error, "Failed to initialize repository structure"); + } +#endif + /* Creates the '/objects/info/' directory */ git__joinpath(temp_path, git_dir, GIT_OBJECTS_INFO_DIR); error = gitfo_mkdir_recurs(temp_path, mode); |
