Re: [PATCH v3 2/7] string-list: align string_list_split() with its _in_place() counterpart
- From
Jeff King <peff@peff.net>
- Date
- Aug 2, 2025, 18:38 UTC
- Message-ID
- <20250802183832.GA1773585@coredump.intra.peff.net>
- In-Reply-To
- <xmqq4iupk7i7.fsf@gitster.g>
On Sat, Aug 02, 2025 at 09:34:08AM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> > I don't think there's a need to re-roll for this. Mostly I was curious > > and thought I'd share my finding on the list. > > Thanks. IIRC, the multi-delimiter capability was used only in one > unit test or test helper that wanted to split at any whitespace. As > it did not look so important, I could have unified them in the other > direction to only support a single delimiter (i.e. reverting that > commit you found), but I think the end result of this series would > give us more ergonomic API that we can apply at more places than > before, so I am happy I didn't.
Agreed.
The commit I mentioned earlier said it was trying to get rid of strtok(), so I assumed there were some real uses. But running "log -Sstrtok", all of those strtok calls were in test helpers!
Well, at least it speaks well of us that we did not let strtok creep into actual git code. ;)
-Peff