Re: [PATCH] test: add git apply whitespace expansion tests

2015-01-22 Thread Kyle J. McKay
On Jan 22, 2015, at 11:23, Junio C Hamano wrote: "Kyle J. McKay" writes: On Jan 21, 2015, at 14:33, Junio C Hamano wrote: "Kyle J. McKay" writes: So since I've not been able to get test 2 or 3 to core dump (even before 250b3c6c) I tend to believe you are correct in that the code thinks (i

Re: [PATCH] test: add git apply whitespace expansion tests

2015-01-22 Thread Junio C Hamano
"Kyle J. McKay" writes: > On Jan 21, 2015, at 14:33, Junio C Hamano wrote: > >> "Kyle J. McKay" writes: >> >>> So since I've not been able to get test 2 or 3 to core dump (even >>> before 250b3c6c) I tend to believe you are correct in that the code >>> thinks (incorrectly) that the result should

Re: [PATCH] test: add git apply whitespace expansion tests

2015-01-21 Thread Kyle J. McKay
On Jan 21, 2015, at 14:33, Junio C Hamano wrote: "Kyle J. McKay" writes: So since I've not been able to get test 2 or 3 to core dump (even before 250b3c6c) I tend to believe you are correct in that the code thinks (incorrectly) that the result should fit within the buffer. Thanks; let me st

Re: [PATCH] test: add git apply whitespace expansion tests

2015-01-21 Thread Junio C Hamano
"Kyle J. McKay" writes: > So since I've not been able to get test 2 or 3 to core dump (even > before 250b3c6c) I tend to believe you are correct in that the code > thinks (incorrectly) that the result should fit within the buffer. Thanks; let me steal your tests when I reroll. -- To unsubscribe

Re: [PATCH] test: add git apply whitespace expansion tests

2015-01-18 Thread Kyle J. McKay
On Jan 18, 2015, at 14:11, Junio C Hamano wrote: On Sun, Jan 18, 2015 at 2:49 AM, Kyle J. McKay wrote: * Here's some tests. With "apply: make update_pre_post_images() sanity check the given postlen" but not "apply: count the size of postimage correctly" test 1/4 and 4/4 trigger the 'die(

Re: [PATCH] test: add git apply whitespace expansion tests

2015-01-18 Thread Junio C Hamano
On Sun, Jan 18, 2015 at 2:49 AM, Kyle J. McKay wrote: > * Here's some tests. With "apply: make update_pre_post_images() sanity > check the given postlen" but not "apply: count the size of postimage > correctly" test 1/4 and 4/4 trigger the 'die("BUG: postlen...' but > test 2/4 and 3/4 do no

[PATCH] test: add git apply whitespace expansion tests

2015-01-18 Thread Kyle J. McKay
When git apply fixes whitespace, the result can end up being longer than the initial text if whitespace ends up being expanded (such as with the tab-in-indent option). Since 250b3c6c (apply --whitespace=fix: avoid running over the postimage buffer, 2013-03-22) an attempt has been made to compute t