|
|
@ -1866,13 +1866,13 @@ static int match_fragment(struct image *img, |
|
|
|
if (match_end && (preimage->nr + try_lno != img->nr)) |
|
|
|
if (match_end && (preimage->nr + try_lno != img->nr)) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} else if (ws_error_action == correct_ws_error && |
|
|
|
} else if (ws_error_action == correct_ws_error && |
|
|
|
(ws_rule & WS_BLANK_AT_EOF) && match_end) { |
|
|
|
(ws_rule & WS_BLANK_AT_EOF)) { |
|
|
|
/* |
|
|
|
/* |
|
|
|
* This hunk that matches at the end extends beyond |
|
|
|
* This hunk extends beyond the end of img, and we are |
|
|
|
* the end of img, and we are removing blank lines |
|
|
|
* removing blank lines at the end of the file. This |
|
|
|
* at the end of the file. This many lines from the |
|
|
|
* many lines from the beginning of the preimage must |
|
|
|
* beginning of the preimage must match with img, and |
|
|
|
* match with img, and the remainder of the preimage |
|
|
|
* the remainder of the preimage must be blank. |
|
|
|
* must be blank. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
preimage_limit = img->nr - try_lno; |
|
|
|
preimage_limit = img->nr - try_lno; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|