summaryrefslogtreecommitdiff
path: root/src/repository.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/repository.c')
-rw-r--r--src/repository.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/repository.c b/src/repository.c
index e9d74b7df..0cbdf086a 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -171,7 +171,13 @@ static git_repository *repository_alloc(void)
int git_repository_new(git_repository **out)
{
- *out = repository_alloc();
+ git_repository *repo;
+
+ *out = repo = repository_alloc();
+ GITERR_CHECK_ALLOC(repo);
+
+ repo->is_bare = 1;
+
return 0;
}