Commit 976b69bdbbd2a84684d5120ac738132ebcd7a532

nulltoken 2012-06-11T11:06:53

repository: widen test coverage regarding initialization and configuration entries

diff --git a/tests-clar/repo/init.c b/tests-clar/repo/init.c
index af54b22..7e37941 100644
--- a/tests-clar/repo/init.c
+++ b/tests-clar/repo/init.c
@@ -166,14 +166,14 @@ void test_repo_init__additional_templates(void)
 	git_buf_free(&path);
 }
 
-static void assert_config_entry_on_init(const char *config_key, int expected_value)
+static void assert_config_entry_on_init_bytype(const char *config_key, int expected_value, bool is_bare)
 {
 	git_config *config;
 	int current_value;
 
 	cl_set_cleanup(&cleanup_repository, "config_entry");
 	
-	cl_git_pass(git_repository_init(&_repo, "config_entry/test.git", 1));
+	cl_git_pass(git_repository_init(&_repo, "config_entry/test.git", is_bare));
 	git_repository_config(&config, _repo);
 
 	if (expected_value >= 0) {
@@ -189,6 +189,14 @@ static void assert_config_entry_on_init(const char *config_key, int expected_val
 	git_config_free(config);
 }
 
+static void assert_config_entry_on_init(const char *config_key, int expected_value)
+{
+	assert_config_entry_on_init_bytype(config_key, expected_value, true);
+	git_repository_free(_repo);
+
+	assert_config_entry_on_init_bytype(config_key, expected_value, false);
+}
+
 void test_repo_init__detect_filemode(void)
 {
 #ifdef GIT_WIN32