Re: [PATCH] test: add git apply whitespace expansion tests
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 18, 2015, 22:11 UTC
- Message-ID
- <CAPc5daXVk_ROUy7rmzS0aosWvE2wqw8tHZgomHHkay9CZjhbiw@mail.gmail.com>
- In-Reply-To
- <102e322e68e78e39a7c227f3f3e102c@74d39fa044aa309eaea14b9f57fe79c>
On Sun, Jan 18, 2015 at 2:49 AM, Kyle J. McKay <mackyle@gmail.com> wrote:
Show 5 quoted lines
> * 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 not although they fail because git apply generates
> garbage.Do the failing cases that do not trigger the new postlen check fail because the original (mis)counting thinks (incorrectly) that the rewritten result _should_ fit within the original postlen (hence we allow an in-place rewrite by passing postlen=0 to the helper), but in fact after rewriting postimage->len ends up being longer due to the miscounting?