Merge branch 'rs/apply-inaccurate-eof-with-incomplete-line' into maint
"git apply --inaccurate-eof" when used with "--ignore-space-change" triggered an internal sanity check, which has been fixed. * rs/apply-inaccurate-eof-with-incomplete-line: apply: update line lengths for --inaccurate-eof
This commit is contained in:
2
apply.c
2
apply.c
@ -2958,6 +2958,8 @@ static int apply_one_fragment(struct apply_state *state,
|
||||
newlines.len > 0 && newlines.buf[newlines.len - 1] == '\n') {
|
||||
old--;
|
||||
strbuf_setlen(&newlines, newlines.len - 1);
|
||||
preimage.line_allocated[preimage.nr - 1].len--;
|
||||
postimage.line_allocated[postimage.nr - 1].len--;
|
||||
}
|
||||
|
||||
leading = frag->leading;
|
||||
|
Reference in New Issue
Block a user