Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
a2ce19ca
Commit
a2ce19ca
authored
Feb 05, 2014
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent user's merge.conflictstyle from breaking tests
parent
5c8be325
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
tests/checkout/conflict.c
+7
-0
tests/merge/workdir/renames.c
+7
-0
tests/merge/workdir/simple.c
+7
-0
No files found.
tests/checkout/conflict.c
View file @
a2ce19ca
...
...
@@ -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
)
...
...
tests/merge/workdir/renames.c
View file @
a2ce19ca
...
...
@@ -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
)
...
...
tests/merge/workdir/simple.c
View file @
a2ce19ca
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment