mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-03 03:59:08 +00:00
apply: compare preimage to image
Compare the preimage to the image; don't compare the preimage to itself.
This commit is contained in:
parent
e02f567641
commit
531be3e8c6
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user