apply: compare preimage to image

Compare the preimage to the image; don't compare the preimage to itself.
This commit is contained in:
Edward Thomson 2016-07-14 22:59:37 -04:00
parent e02f567641
commit 531be3e8c6

View File

@ -97,7 +97,7 @@ static bool match_hunk(
git_diff_line *preimage_line = git_vector_get(&preimage->lines, i);
git_diff_line *image_line = git_vector_get(&image->lines, linenum + i);
if (preimage_line->content_len != preimage_line->content_len ||
if (preimage_line->content_len != image_line->content_len ||
memcmp(preimage_line->content, image_line->content, image_line->content_len) != 0) {
match = 0;
break;