Commit 4738a3376aa796c5a742b4bb9e1330e17bd412e3

Pierre-Olivier Latour 2015-01-23T20:57:13

Fixed git_repository_set_bare() not setting "core.bare" correctly

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/repository.c b/src/repository.c
index 0cf8eb6..983ecee 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -1723,7 +1723,7 @@ int git_repository_set_bare(git_repository *repo)
 	if ((error = git_repository_config__weakptr(&config, repo)) < 0)
 		return error;
 
-	if ((error = git_config_set_bool(config, "core.bare", false)) < 0)
+	if ((error = git_config_set_bool(config, "core.bare", true)) < 0)
 		return error;
 
 	if ((error = git_config__update_entry(config, "core.worktree", NULL, true, true)) < 0)