diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-06 09:09:03 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-06 09:09:03 -0800 |
commit | 43240cb7316a7ea653ada00adfddd5ea80f90cf3 (patch) | |
tree | b6e0d121867132767c29b5d89d985abf08b24cbe /apply.c | |
parent | 2db93a80d37d463ab66dc71ba4e10cbaae8f807f (diff) | |
parent | 4855de123391daab82407b44de03ba5647e97694 (diff) | |
download | git-43240cb7316a7ea653ada00adfddd5ea80f90cf3.tar.gz |
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
Diffstat (limited to 'apply.c')
-rw-r--r-- | apply.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |