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
496b76d4
Commit
496b76d4
authored
Feb 27, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkout tests: just use SAFE where appropriate
parent
96b82b11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
tests/checkout/tree.c
+3
-7
tests/checkout/typechange.c
+1
-2
No files found.
tests/checkout/tree.c
View file @
496b76d4
...
...
@@ -15,8 +15,7 @@ void test_checkout_tree__initialize(void)
g_repo
=
cl_git_sandbox_init
(
"testrepo"
);
GIT_INIT_STRUCTURE
(
&
g_opts
,
GIT_CHECKOUT_OPTIONS_VERSION
);
g_opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
|
GIT_CHECKOUT_RECREATE_MISSING
;
g_opts
.
checkout_strategy
=
GIT_CHECKOUT_FORCE
;
}
void
test_checkout_tree__cleanup
(
void
)
...
...
@@ -409,8 +408,7 @@ void test_checkout_tree__can_checkout_with_pattern(void)
/* now to a narrow patterned checkout */
g_opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
|
GIT_CHECKOUT_RECREATE_MISSING
;
g_opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
;
g_opts
.
paths
.
strings
=
entries
;
g_opts
.
paths
.
count
=
1
;
...
...
@@ -448,7 +446,6 @@ void test_checkout_tree__can_disable_pattern_match(void)
g_opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
|
GIT_CHECKOUT_RECREATE_MISSING
|
GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH
;
g_opts
.
paths
.
strings
=
entries
;
g_opts
.
paths
.
count
=
1
;
...
...
@@ -461,8 +458,7 @@ void test_checkout_tree__can_disable_pattern_match(void)
/* let's try that again, but allow the pattern match */
g_opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
|
GIT_CHECKOUT_RECREATE_MISSING
;
g_opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
;
cl_git_pass
(
git_checkout_tree
(
g_repo
,
g_object
,
&
g_opts
));
...
...
tests/checkout/typechange.c
View file @
496b76d4
...
...
@@ -212,8 +212,7 @@ void test_checkout_typechange__checkout_with_conflicts(void)
p_mkdir
(
"typechanges/d"
,
0777
);
/* intentionally empty dir */
force_create_file
(
"typechanges/untracked"
);
opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
|
GIT_CHECKOUT_RECREATE_MISSING
;
opts
.
checkout_strategy
=
GIT_CHECKOUT_SAFE
;
memset
(
&
cts
,
0
,
sizeof
(
cts
));
cl_git_fail
(
git_checkout_tree
(
g_repo
,
obj
,
&
opts
));
...
...
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