mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 15:33:51 +00:00
tests: fix indentation in repo/init.c
This commit is contained in:
parent
1ca163ff13
commit
f7b060188a
@ -263,36 +263,36 @@ void test_repo_init__reinit_doesnot_overwrite_ignorecase(void)
|
|||||||
|
|
||||||
void test_repo_init__reinit_overwrites_filemode(void)
|
void test_repo_init__reinit_overwrites_filemode(void)
|
||||||
{
|
{
|
||||||
git_config *config;
|
git_config *config;
|
||||||
int expected, current_value;
|
int expected, current_value;
|
||||||
|
|
||||||
#ifdef GIT_WIN32
|
#ifdef GIT_WIN32
|
||||||
expected = false;
|
expected = false;
|
||||||
#else
|
#else
|
||||||
expected = true;
|
expected = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Init a new repo */
|
/* Init a new repo */
|
||||||
cl_set_cleanup(&cleanup_repository, "overwrite.git");
|
cl_set_cleanup(&cleanup_repository, "overwrite.git");
|
||||||
cl_git_pass(git_repository_init(&_repo, "overwrite.git", 1));
|
cl_git_pass(git_repository_init(&_repo, "overwrite.git", 1));
|
||||||
|
|
||||||
|
|
||||||
/* Change the "core.filemode" config value to something unlikely */
|
/* Change the "core.filemode" config value to something unlikely */
|
||||||
git_repository_config(&config, _repo);
|
git_repository_config(&config, _repo);
|
||||||
git_config_set_bool(config, "core.filemode", !expected);
|
git_config_set_bool(config, "core.filemode", !expected);
|
||||||
git_config_free(config);
|
git_config_free(config);
|
||||||
git_repository_free(_repo);
|
git_repository_free(_repo);
|
||||||
_repo = NULL;
|
_repo = NULL;
|
||||||
|
|
||||||
/* Reinit the repository */
|
/* Reinit the repository */
|
||||||
cl_git_pass(git_repository_init(&_repo, "overwrite.git", 1));
|
cl_git_pass(git_repository_init(&_repo, "overwrite.git", 1));
|
||||||
git_repository_config(&config, _repo);
|
git_repository_config(&config, _repo);
|
||||||
|
|
||||||
/* Ensure the "core.filemode" config value has been reset */
|
/* Ensure the "core.filemode" config value has been reset */
|
||||||
cl_git_pass(git_config_get_bool(¤t_value, config, "core.filemode"));
|
cl_git_pass(git_config_get_bool(¤t_value, config, "core.filemode"));
|
||||||
cl_assert_equal_i(expected, current_value);
|
cl_assert_equal_i(expected, current_value);
|
||||||
|
|
||||||
git_config_free(config);
|
git_config_free(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_repo_init__sets_logAllRefUpdates_according_to_type_of_repository(void)
|
void test_repo_init__sets_logAllRefUpdates_according_to_type_of_repository(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user