Skip to content

Commit 531be3e

Browse files
author
Edward Thomson
committed
apply: compare preimage to image
Compare the preimage to the image; don't compare the preimage to itself.
1 parent e02f567 commit 531be3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static bool match_hunk(
9797
git_diff_line *preimage_line = git_vector_get(&preimage->lines, i);
9898
git_diff_line *image_line = git_vector_get(&image->lines, linenum + i);
9999

100-
if (preimage_line->content_len != preimage_line->content_len ||
100+
if (preimage_line->content_len != image_line->content_len ||
101101
memcmp(preimage_line->content, image_line->content, image_line->content_len) != 0) {
102102
match = 0;
103103
break;

0 commit comments

Comments
 (0)