summaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-27 02:06:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-27 02:06:36 (GMT)
commitd78a122e9cb33df8e625fcf15cb075cc6d61b984 (patch)
treea98238497bb2fed0f557736147d44099a41126cf /apply.c
parentc2ed68342b8247d99fa1204872984ce9817fbaae (diff)
parent4855de123391daab82407b44de03ba5647e97694 (diff)
downloadgit-d78a122e9cb33df8e625fcf15cb075cc6d61b984.zip
git-d78a122e9cb33df8e625fcf15cb075cc6d61b984.tar.gz
git-d78a122e9cb33df8e625fcf15cb075cc6d61b984.tar.bz2
Merge branch 'rs/apply-inaccurate-eof-with-incomplete-line'
"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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apply.c b/apply.c
index b8087bd..321a9fa 100644
--- a/apply.c
+++ b/apply.c
@@ -2953,6 +2953,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;