builtin-apply.c: clean-up apply_one_fragment()
authorJunio C Hamano <gitster@pobox.com>
Wed, 30 Jan 2008 21:12:25 +0000 (13:12 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Feb 2008 08:38:41 +0000 (00:38 -0800)
commit61e08ccacbfdc6046ccabdfdb01f7755ed5ad8b1
treeb94ae6fe5057f5f97cbdb35785fb003cd3e19551
parentc330fdd42dc57127272534cd2a8dd9569334b219
builtin-apply.c: clean-up apply_one_fragment()

We had two pointer variables pointing to the same buffer and an
integer variable used to index into its tail part that was
active (old, oldlines and oldsize for the preimage, and their
'new' counterparts for the postimage).

To help readability, use 'oldlines' as the allocated pointer,
and use 'old' as the pointer to the tail that advances while the
code builds up the contents in the buffer.  The size 'oldsize'
can be computed as (old-oldines).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-apply.c