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
7b8d564d
Commit
7b8d564d
authored
Apr 25, 2014
by
Jiri Pospisil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reset tests: Use sandboxed index
parent
424222f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
tests/reset/default.c
+3
-6
No files found.
tests/reset/default.c
View file @
7b8d564d
...
...
@@ -185,23 +185,20 @@ void test_reset_default__resetting_unknown_filepaths_does_not_fail(void)
void
test_reset_default__staged_rename_reset_delete
(
void
)
{
git_index
*
idx
;
git_index_entry
entry
;
const
git_index_entry
*
existing
;
char
*
paths
[]
=
{
"new.txt"
};
initialize
(
"testrepo2"
);
cl_git_pass
(
git_repository_index
(
&
idx
,
_repo
));
existing
=
git_index_get_bypath
(
idx
,
"new.txt"
,
0
);
existing
=
git_index_get_bypath
(
_index
,
"new.txt"
,
0
);
cl_assert
(
existing
);
memcpy
(
&
entry
,
existing
,
sizeof
(
entry
));
cl_git_pass
(
git_index_remove_bypath
(
id
x
,
"new.txt"
));
cl_git_pass
(
git_index_remove_bypath
(
_inde
x
,
"new.txt"
));
entry
.
path
=
"renamed.txt"
;
cl_git_pass
(
git_index_add
(
id
x
,
&
entry
));
cl_git_pass
(
git_index_add
(
_inde
x
,
&
entry
));
_pathspecs
.
strings
=
paths
;
_pathspecs
.
count
=
1
;
...
...
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