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
531be3e8
Commit
531be3e8
authored
Jul 14, 2016
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply: compare preimage to image
Compare the preimage to the image; don't compare the preimage to itself.
parent
e02f5676
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
src/apply.c
+1
-1
No files found.
src/apply.c
View file @
531be3e8
...
@@ -97,7 +97,7 @@ static bool match_hunk(
...
@@ -97,7 +97,7 @@ static bool match_hunk(
git_diff_line
*
preimage_line
=
git_vector_get
(
&
preimage
->
lines
,
i
);
git_diff_line
*
preimage_line
=
git_vector_get
(
&
preimage
->
lines
,
i
);
git_diff_line
*
image_line
=
git_vector_get
(
&
image
->
lines
,
linenum
+
i
);
git_diff_line
*
image_line
=
git_vector_get
(
&
image
->
lines
,
linenum
+
i
);
if
(
preimage_line
->
content_len
!=
pre
image_line
->
content_len
||
if
(
preimage_line
->
content_len
!=
image_line
->
content_len
||
memcmp
(
preimage_line
->
content
,
image_line
->
content
,
image_line
->
content_len
)
!=
0
)
{
memcmp
(
preimage_line
->
content
,
image_line
->
content
,
image_line
->
content_len
)
!=
0
)
{
match
=
0
;
match
=
0
;
break
;
break
;
...
...
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