Subject: Re: [PATCH v7 0/5] Make the "promisor-remote" capability support more fields

From: Junio C Hamano <[email-masked]>
Date: Thu, 31 Jul 2025 08:48:05 -0700

Christian Couder <[email-masked]> writes:

> Here are the changes compared to v6:

All looked sensible.  Especially ...

>     -+  struct strbuf **elems = strbuf_split(remote_info, ',');
>     ++  struct string_list elem_list = STRING_LIST_INIT_NODUP;
>     ++  struct string_list_item *item;
>      +
>     -+  for (size_t i = 0; elems[i]; i++) {
>     -+          char *elem = elems[i]->buf;
>     ++  string_list_split_in_place(&elem_list, remote_info->buf, ",", -1);

... because of this change, we do not have to do ...

>     -+          strbuf_strip_suffix(elems[i], ",");

... this, which is very nice.  Unlike string_list_split_in_place()
that can take multiple delimiter bytes, strbuf_split() can take only
a single byte as the delimiter, so leaving it at the end of each
split pieces does not make much sense (at least, that is done not
because we do not want to lose information), and having to strip the
suffix after splitting always felt like papering over a wrong
behaviour of the helper function.