diff options
author | Edward Thomson <ethomson@microsoft.com> | 2015-03-10 15:02:02 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2015-03-10 15:02:02 -0400 |
commit | 770aca94bd209495ff28bbf5cbe9f282d02e7495 (patch) | |
tree | 09cbcf03e7d0913837f410aee0bb404a8b14571e /src | |
parent | bdf0e734506b5b18234d48a0e7c6995aeda30b9d (diff) | |
download | libgit2-770aca94bd209495ff28bbf5cbe9f282d02e7495.tar.gz |
repository: in-memory repos are bare by default
Diffstat (limited to 'src')
-rw-r--r-- | src/repository.c | 8 |
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; } |