mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-07 17:27:40 +00:00
Prevent user's merge.conflictstyle from breaking tests
This commit is contained in:
parent
5c8be32559
commit
a2ce19ca68
@ -61,12 +61,19 @@ struct checkout_name_entry {
|
|||||||
|
|
||||||
void test_checkout_conflict__initialize(void)
|
void test_checkout_conflict__initialize(void)
|
||||||
{
|
{
|
||||||
|
git_config *cfg;
|
||||||
|
|
||||||
g_repo = cl_git_sandbox_init(TEST_REPO_PATH);
|
g_repo = cl_git_sandbox_init(TEST_REPO_PATH);
|
||||||
git_repository_index(&g_index, g_repo);
|
git_repository_index(&g_index, g_repo);
|
||||||
|
|
||||||
cl_git_rewritefile(
|
cl_git_rewritefile(
|
||||||
TEST_REPO_PATH "/.gitattributes",
|
TEST_REPO_PATH "/.gitattributes",
|
||||||
"* text eol=lf\n");
|
"* 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)
|
void test_checkout_conflict__cleanup(void)
|
||||||
|
@ -17,7 +17,14 @@ static git_repository *repo;
|
|||||||
// Fixture setup and teardown
|
// Fixture setup and teardown
|
||||||
void test_merge_workdir_renames__initialize(void)
|
void test_merge_workdir_renames__initialize(void)
|
||||||
{
|
{
|
||||||
|
git_config *cfg;
|
||||||
|
|
||||||
repo = cl_git_sandbox_init(TEST_REPO_PATH);
|
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)
|
void test_merge_workdir_renames__cleanup(void)
|
||||||
|
@ -116,8 +116,15 @@ static git_index *repo_index;
|
|||||||
// Fixture setup and teardown
|
// Fixture setup and teardown
|
||||||
void test_merge_workdir_simple__initialize(void)
|
void test_merge_workdir_simple__initialize(void)
|
||||||
{
|
{
|
||||||
|
git_config *cfg;
|
||||||
|
|
||||||
repo = cl_git_sandbox_init(TEST_REPO_PATH);
|
repo = cl_git_sandbox_init(TEST_REPO_PATH);
|
||||||
git_repository_index(&repo_index, repo);
|
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)
|
void test_merge_workdir_simple__cleanup(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user