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
fd4e3b21
Unverified
Commit
fd4e3b21
authored
Nov 13, 2018
by
Edward Thomson
Committed by
GitHub
Nov 13, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4885 from pks-t/pks/apply-test-fixups
apply: small fixups in the test suite
parents
cf83809b
afc64bcd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
tests/apply/both.c
+3
-3
tests/apply/partial.c
+2
-2
tests/apply/workdir.c
+1
-1
No files found.
tests/apply/both.c
View file @
fd4e3b21
...
...
@@ -244,7 +244,7 @@ void test_apply_both__application_failure_leaves_workdir_unmodified(void)
"This is a modification.
\n
"
);
cl_git_pass
(
git_repository_index
(
&
index
,
repo
));
git_index_add_bypath
(
index
,
"veal.txt"
);
cl_git_pass
(
git_index_add_bypath
(
index
,
"veal.txt"
)
);
cl_git_pass
(
git_index_write
(
index
));
git_index_free
(
index
);
...
...
@@ -291,7 +291,7 @@ void test_apply_both__keeps_nonconflicting_changes(void)
idx_entry
.
mode
=
0100644
;
idx_entry
.
path
=
"beef.txt"
;
cl_git_pass
(
git_oid_fromstr
(
&
idx_entry
.
id
,
"898d12687fb35be271c27c795a6b32c8b51da79e"
));
git_index_add
(
index
,
&
idx_entry
);
cl_git_pass
(
git_index_add
(
index
,
&
idx_entry
)
);
cl_git_pass
(
git_index_remove
(
index
,
"bouilli.txt"
,
0
));
cl_git_pass
(
git_index_write
(
index
));
...
...
@@ -337,7 +337,7 @@ void test_apply_both__can_apply_nonconflicting_file_changes(void)
"This line is added in the index and the workdir.
\n
"
);
cl_git_pass
(
git_repository_index
(
&
index
,
repo
));
git_index_add_bypath
(
index
,
"asparagus.txt"
);
cl_git_pass
(
git_index_add_bypath
(
index
,
"asparagus.txt"
)
);
cl_git_pass
(
git_index_write
(
index
));
git_index_free
(
index
);
...
...
tests/apply/partial.c
View file @
fd4e3b21
...
...
@@ -104,8 +104,8 @@ static int apply_buf(
}
git__free
(
filename
);
git_buf_
fre
e
(
&
result
);
git_buf_
fre
e
(
&
patchbuf
);
git_buf_
dispos
e
(
&
result
);
git_buf_
dispos
e
(
&
patchbuf
);
git_patch_free
(
patch
);
return
error
;
...
...
tests/apply/workdir.c
View file @
fd4e3b21
...
...
@@ -167,7 +167,7 @@ void test_apply_workdir__modified_index_with_unmodified_workdir_is_ok(void)
sizeof
(
struct
merge_index_entry
);
/* mutate the index and leave the workdir matching HEAD */
git_repository_index
(
&
index
,
repo
);
cl_git_pass
(
git_repository_index
(
&
index
,
repo
)
);
idx_entry
.
mode
=
0100644
;
idx_entry
.
path
=
"veal.txt"
;
...
...
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