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
cce2f16b
Commit
cce2f16b
authored
Jan 10, 2013
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indentations
parent
d0b14cea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
tests-clar/checkout/tree.c
+20
-20
No files found.
tests-clar/checkout/tree.c
View file @
cce2f16b
...
...
@@ -122,26 +122,26 @@ void test_checkout_tree__calls_progress_callback(void)
void
test_checkout_tree__doesnt_write_unrequested_files_to_worktree
(
void
)
{
git_oid
master_oid
;
git_oid
chomped_oid
;
git_commit
*
p_master_commit
;
git_commit
*
p_chomped_commit
;
git_checkout_opts
opts
=
GIT_CHECKOUT_OPTS_INIT
;
git_oid_fromstr
(
&
master_oid
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
git_oid_fromstr
(
&
chomped_oid
,
"e90810b8df3e80c413d903f631643c716887138d"
);
cl_git_pass
(
git_commit_lookup
(
&
p_master_commit
,
g_repo
,
&
master_oid
));
cl_git_pass
(
git_commit_lookup
(
&
p_chomped_commit
,
g_repo
,
&
chomped_oid
));
/* GIT_CHECKOUT_NONE should not add any file to the working tree from the
* index as it is supposed to be a dry run.
*/
opts
.
checkout_strategy
=
GIT_CHECKOUT_NONE
;
git_checkout_tree
(
g_repo
,
(
git_object
*
)
p_chomped_commit
,
&
opts
);
cl_assert_equal_i
(
false
,
git_path_isfile
(
"testrepo/readme.txt"
));
git_commit_free
(
p_master_commit
);
git_commit_free
(
p_chomped_commit
);
git_oid
master_oid
;
git_oid
chomped_oid
;
git_commit
*
p_master_commit
;
git_commit
*
p_chomped_commit
;
git_checkout_opts
opts
=
GIT_CHECKOUT_OPTS_INIT
;
git_oid_fromstr
(
&
master_oid
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
git_oid_fromstr
(
&
chomped_oid
,
"e90810b8df3e80c413d903f631643c716887138d"
);
cl_git_pass
(
git_commit_lookup
(
&
p_master_commit
,
g_repo
,
&
master_oid
));
cl_git_pass
(
git_commit_lookup
(
&
p_chomped_commit
,
g_repo
,
&
chomped_oid
));
/* GIT_CHECKOUT_NONE should not add any file to the working tree from the
* index as it is supposed to be a dry run.
*/
opts
.
checkout_strategy
=
GIT_CHECKOUT_NONE
;
git_checkout_tree
(
g_repo
,
(
git_object
*
)
p_chomped_commit
,
&
opts
);
cl_assert_equal_i
(
false
,
git_path_isfile
(
"testrepo/readme.txt"
));
git_commit_free
(
p_master_commit
);
git_commit_free
(
p_chomped_commit
);
}
void
test_checkout_tree__can_switch_branches
(
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