From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Deveshi Dwivedi <deveshigurgaon@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH v3 2/2] list-objects-filter-options: avoid strbuf_split_str()
Date: Wed, 11 Mar 2026 11:13:37 -0700 [thread overview]
Message-ID: <xmqqjyvip73i.fsf@gitster.g> (raw)
In-Reply-To: <20260311174816.GB1900488@coredump.intra.peff.net> (Jeff King's message of "Wed, 11 Mar 2026 13:48:16 -0400")
Jeff King <peff@peff.net> writes:
> On Wed, Mar 11, 2026 at 05:33:36PM +0000, Deveshi Dwivedi wrote:
>
>> + while (*p && !result) {
>> + const char *end = strchrnul(p, '+');
>> +
>> + strbuf_reset(&sub);
>> + strbuf_add(&sub, p, end - p);
>> +
>> + if (sub.len)
>> + result = parse_combine_subfilter(filter_options, sub.buf, errbuf);
>> +
>> + if (!*end)
>> + break;
>> + p = end + 1;
>> }
>> + strbuf_release(&sub);
>
> This version of the loop looks good to me.
>
> -Peff
Thanks, both. Will queue.
prev parent reply other threads:[~2026-03-11 18:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 13:20 [PATCH v2 0/2] avoid unnecessary strbuf_split*() and strbuf-by-value usage Deveshi Dwivedi
2026-03-11 13:20 ` [PATCH v2 1/2] worktree: do not pass strbuf by value Deveshi Dwivedi
2026-03-11 13:20 ` [PATCH v2 2/2] list-objects-filter-options: avoid strbuf_split_str() Deveshi Dwivedi
2026-03-11 16:28 ` Junio C Hamano
2026-03-11 17:45 ` Jeff King
2026-03-11 18:07 ` Junio C Hamano
2026-03-11 17:33 ` [PATCH v3 0/2] avoid unnecessary strbuf_split*() and strbuf-by-value usage Deveshi Dwivedi
2026-03-11 17:33 ` [PATCH v3 1/2] worktree: do not pass strbuf by value Deveshi Dwivedi
2026-03-11 17:33 ` [PATCH v3 2/2] list-objects-filter-options: avoid strbuf_split_str() Deveshi Dwivedi
2026-03-11 17:48 ` Jeff King
2026-03-11 18:13 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqjyvip73i.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=deveshigurgaon@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.