Subject: Re: [PATCH v6 09/11] add-patch: add support for in-memory index patching

From: Phillip Wood <[email-masked]>
Date: Thu, 20 Nov 2025 15:05:43 +0000

On 20/11/2025 07:04, Elijah Newren wrote:
> On Mon, Oct 27, 2025 at 4:34 AM Patrick Steinhardt <[email-masked]> wrote:
> 
> I'm totally unfamiliar with add-patch.[ch] beyond what I've been
> reviewing in this series, so this may be a dumb/naive question, but
> why add a sibling run_add_p_index() to run_add_p() via
> copy+paste+modify?  (Or is it not copy+paste+modify in some
> interesting way?)  I'm worried the two will drift, and I'm curious
> whether run_add_p() should just be calling run_add_p_index() and just
> passing r->index for the index field.  Is there a reason that doesn't
> work?

That's a very good question. I also wondered if there is a way to 
prevent any future changes from accidentally using "s->r->index" instead 
of the "s->index" but I don't think there is.

Thanks

Phillip