Re: [PATCH 2/4] make filepairs detachable
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jun 30, 2006, 07:50 UTC
- Message-ID
- <7v7j2zkrod.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <81b0412b0606300042r24931d9i5fad0e849b8de84c@mail.gmail.com>
"Alex Riesen" <raa.lkml@gmail.com> writes:
> BTW, is there any chance we get the struct diff_filepair's > double-linked? They don't seem to be sorted. Will increase > the memory footprint, though.
You do not necessarily have to do things in place. In fact, all of the standard diffcore transformers create a new queue, read from the old queue and place the filtered or munged result in the new queue, swap the global queued_diff variable to point at the new one and discard the old queue.
See diff.c::diffcore_apply_filter() for the simplest example.