Re: [PATCH 03/14] strutil: add skip_prefix_icase

2016-01-01 Thread Jeff King
On Thu, Dec 31, 2015 at 01:40:46AM -0500, Eric Sunshine wrote: > > diff --git a/builtin/log.c b/builtin/log.c > > @@ -677,10 +677,10 @@ static void add_header(const char *value) > > - if (!strncasecmp(value, "to: ", 4)) > > - item = string_list_append(&extra_to, value + 4); > >

Re: [PATCH 03/14] strutil: add skip_prefix_icase

2015-12-30 Thread Eric Sunshine
On Tue, Dec 29, 2015 at 2:22 AM, Jeff King wrote: > Some sites that otherwise would use skip_prefix cannot do > so, because it has no way to do case-insensitive > comparisons. Such sites usually get around this by using > strncasecmp, at the cost of having to use magic numbers. > We can help them

[PATCH 03/14] strutil: add skip_prefix_icase

2015-12-28 Thread Jeff King
Some sites that otherwise would use skip_prefix cannot do so, because it has no way to do case-insensitive comparisons. Such sites usually get around this by using strncasecmp, at the cost of having to use magic numbers. We can help them by providing a case-insensitive version of skip_prefix. Unfo