Commit 770aca94bd209495ff28bbf5cbe9f282d02e7495

Edward Thomson 2015-03-10T15:02:02

repository: in-memory repos are bare by default

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/repository.c b/src/repository.c
index e9d74b7..0cbdf08 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;
 }