Commit a2ce19ca by Ben Straub

Prevent user's merge.conflictstyle from breaking tests

parent 5c8be325
......@@ -61,12 +61,19 @@ struct checkout_name_entry {
void test_checkout_conflict__initialize(void)
{
git_config *cfg;
g_repo = cl_git_sandbox_init(TEST_REPO_PATH);
git_repository_index(&g_index, g_repo);
cl_git_rewritefile(
TEST_REPO_PATH "/.gitattributes",
"* text eol=lf\n");
/* Ensure that the user's merge.conflictstyle doesn't interfere */
cl_git_pass(git_repository_config(&cfg, g_repo));
cl_git_pass(git_config_set_string(cfg, "merge.conflictstyle", "merge"));
git_config_free(cfg);
}
void test_checkout_conflict__cleanup(void)
......
......@@ -17,7 +17,14 @@ static git_repository *repo;
// Fixture setup and teardown
void test_merge_workdir_renames__initialize(void)
{
git_config *cfg;
repo = cl_git_sandbox_init(TEST_REPO_PATH);
/* Ensure that the user's merge.conflictstyle doesn't interfere */
cl_git_pass(git_repository_config(&cfg, repo));
cl_git_pass(git_config_set_string(cfg, "merge.conflictstyle", "merge"));
git_config_free(cfg);
}
void test_merge_workdir_renames__cleanup(void)
......
......@@ -116,8 +116,15 @@ static git_index *repo_index;
// Fixture setup and teardown
void test_merge_workdir_simple__initialize(void)
{
git_config *cfg;
repo = cl_git_sandbox_init(TEST_REPO_PATH);
git_repository_index(&repo_index, repo);
/* Ensure that the user's merge.conflictstyle doesn't interfere */
cl_git_pass(git_repository_config(&cfg, repo));
cl_git_pass(git_config_set_string(cfg, "merge.conflictstyle", "merge"));
git_config_free(cfg);
}
void test_merge_workdir_simple__cleanup(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment