Re: [PATCH v4 1/5] promisor-remote: refactor to get rid of 'struct strvec'
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jun 25, 2025, 12:53 UTC
- Message-ID
- <CAP8UFD07pK0iAY4cqu4gCAASeaJRtu1+FhPtgcbJBP0Th72sKg@mail.gmail.com>
- In-Reply-To
- <CAOLa=ZQm+Hm_rMNJY7B4dGAuV=nFecsiPZ9N8uChhEwzb8n+Hw@mail.gmail.com>
On Thu, Jun 19, 2025 at 1:53 PM Karthik Nayak <karthik.188@gmail.com> wrote:
Show 17 quoted lines
> > Christian Couder <christian.couder@gmail.com> writes: > > > In a following commit, we will use the new 'promisor-remote' protocol > > capability introduced by d460267613 (Add 'promisor-remote' capability > > to protocol v2, 2025-02-18) to pass and process more information > > about promisor remotes than just their name and url. > > > > For that purpose, we will need to store information about other > > fields, especially information that might or might not be available > > for different promisor remotes. Unfortunately using 'struct strvec', > > as we currently do, to store information about the promisor remotes > > with one 'struct strvec' for each field like "name" or "url" does not > > scale easily in that case. > > > > Nit: It would be nice to mention _why_ it doesn't scale easily here.
In v5, I have added the following to better explain it:
"We would need one 'struct strvec' for each new field, and then we would have to pass all these 'struct strvec' around."
[...]
> The rest of the patch looks good to me.
Thanks!