Re: [PATCH 5/6] strbuf: remove unused istarts_with() function
- From
Jeff King <peff@peff.net>
- Date
- Nov 19, 2021, 14:40 UTC
- Message-ID
- <YZe3RCFsXomGHv3G@coredump.intra.peff.net>
- In-Reply-To
- <patch-5.6-642eec3d77c-20211119T124420Z-avarab@gmail.com>
On Fri, Nov 19, 2021 at 01:46:25PM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 11 quoted lines
> This function was added in 66b8af3e124 (strbuf: add a case insensitive > starts_with(), 2018-03-09) for use with code added in > 2f0c4a362c5 (utf8: teach same_encoding() alternative UTF encoding > names, 2018-04-15). > > That use got rewritten in ed283588330 (convert: use skip_iprefix() in > validate_encoding(), 2019-11-08) to use skip_iprefix() instead. > > It's arguably slightly odd to have a skip_prefix() and iskip_prefix(), > but not both variants when it comes to starts_with(), but this is easy > enough to resurrect should we ever need it, so let's drop it for now.
I have a custom patch that uses istarts_with(), but it's not something that will ever go upstream. I'll probably just switch it to do:
skip_iprefix(..., &dummy);
which is equivalent. Not really an objection, but just mentioning that unused functions may have ripple effects for topics in flight.
-Peff