# [RFC Outreachy] gpg-interface: Replace strbuf_split()* with string_list_split()

3 messages from 2025-10-14 to 2025-10-14. Participants: Bello Olamide, Christian Couder.
Thread: https://gitlist.dev/t/64315

## Bello Olamide, 2025-10-14 00:44

Subject: [RFC Outreachy] gpg-interface: Replace strbuf_split()* with string_list_split()
Message-ID: <CAD=f0L9Z2kPWv-=wPbtytbMS7BuUtmAKCv2X_2rq0hB_Wsh=UA@mail.gmail.com>
URL: https://gitlist.dev/e/CAD%3Df0L9Z2kPWv-%3DwPbtytbMS7BuUtmAKCv2X_2rq0hB_Wsh%3DUA%40mail.gmail.com

```
Hello,

In continuation of my search for an appropriate microproject after
temporarily moving on from my mail to the list which was about
the check-whitespace script check for \No newline, I stumbled on the
thread
https://public-inbox.org/git/20250731225433.4028872-1-gitster@pobox.com/.
After studying the thread and searching the codebase for other
instances where strbuf_split()* can be replaced with string_list_split(),
I saw some cases in gpg-interface.c where get_ssh_key_fingerprint and
get_default_ssh_signing_key functions use the strbuf_split_max to split the
input string and I think they can be good candidates for replacement with
string_list_split().

Please, will this be good for a microproject?
I will also appreciate any guides.

Thanks
Bello

```

## Christian Couder, 2025-10-14 08:56

Subject: Re: [RFC Outreachy] gpg-interface: Replace strbuf_split()* with string_list_split()
Message-ID: <CAP8UFD2azLtbeMzGhgxHcdnCF=jD5esOs3BjhLWGCXvMmppX4w@mail.gmail.com>
URL: https://gitlist.dev/e/CAP8UFD2azLtbeMzGhgxHcdnCF%3DjD5esOs3BjhLWGCXvMmppX4w%40mail.gmail.com
In-Reply-To: <CAD=f0L9Z2kPWv-=wPbtytbMS7BuUtmAKCv2X_2rq0hB_Wsh=UA@mail.gmail.com>

```
Hi,

On Tue, Oct 14, 2025 at 2:44 AM Bello Olamide <belkid98@gmail.com> wrote:
>
> Hello,
>
> In continuation of my search for an appropriate microproject after
> temporarily moving on from my mail to the list which was about
> the check-whitespace script check for \No newline, I stumbled on the
> thread
> https://public-inbox.org/git/20250731225433.4028872-1-gitster@pobox.com/.
> After studying the thread and searching the codebase for other
> instances where strbuf_split()* can be replaced with string_list_split(),
> I saw some cases in gpg-interface.c where get_ssh_key_fingerprint and
> get_default_ssh_signing_key functions use the strbuf_split_max to split the
> input string and I think they can be good candidates for replacement with
> string_list_split().
>
> Please, will this be good for a microproject?
> I will also appreciate any guides.

Yeah, I think it could be a good microproject.

The functions you mention don't modify the strings resulting from the
split, so those strings don't need to be strbufs. This should be noted
in the commit message (which should provide the reasons why the change
makes sense).

```

## Bello Olamide, 2025-10-14 10:31

Subject: Re: [RFC Outreachy] gpg-interface: Replace strbuf_split()* with string_list_split()
Message-ID: <CAD=f0L8F585EDRUBJW-WbCd3299wQi832rMK+69Lhfuo2atywQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAD%3Df0L8F585EDRUBJW-WbCd3299wQi832rMK%2B69Lhfuo2atywQ%40mail.gmail.com
In-Reply-To: <CAP8UFD2azLtbeMzGhgxHcdnCF=jD5esOs3BjhLWGCXvMmppX4w@mail.gmail.com>

```
On Tue, 14 Oct 2025 at 09:57, Christian Couder
<christian.couder@gmail.com> wrote:
>
> Hi,
>
> On Tue, Oct 14, 2025 at 2:44 AM Bello Olamide <belkid98@gmail.com> wrote:
> >
> > Hello,
> >
> > In continuation of my search for an appropriate microproject after
> > temporarily moving on from my mail to the list which was about
> > the check-whitespace script check for \No newline, I stumbled on the
> > thread
> > https://public-inbox.org/git/20250731225433.4028872-1-gitster@pobox.com/.
> > After studying the thread and searching the codebase for other
> > instances where strbuf_split()* can be replaced with string_list_split(),
> > I saw some cases in gpg-interface.c where get_ssh_key_fingerprint and
> > get_default_ssh_signing_key functions use the strbuf_split_max to split the
> > input string and I think they can be good candidates for replacement with
> > string_list_split().
> >
> > Please, will this be good for a microproject?
> > I will also appreciate any guides.
>
> Yeah, I think it could be a good microproject.
>
> The functions you mention don't modify the strings resulting from the
> split, so those strings don't need to be strbufs. This should be noted
> in the commit message (which should provide the reasons why the change
> makes sense).

Hello Christian,
Thank you very much for your response.
I will now prepare the patch.

Regards
Bello.

```
