Re: [PATCH v2 1/8] fast-import: tighten path unquoting
On Apr 10, 2024, at 02:14, Thalia Archibald <thalia@archibald.dev> wrote:
Show 9 quoted lines
> On Apr 10, 2024, at 01:51, Chris Torek <chris.torek@gmail.com> wrote:
>> On Wed, Apr 10, 2024 at 1:47 AM Thalia Archibald <thalia@archibald.dev> wrote:
>>> strchrnul does what I want here and I’ve replaced it with that.
>>
>> `strchrnul` is a GNU extension (found on a lot of systems, but not
>> part of C90 or C99).
>
> I can’t speak to Git standards, but it seems broadly used in Git, including
> three times already in fast-import.
… and that would be because it is supplied when unavailable:
git-compat-util.h
#ifndef HAVE_STRCHRNUL
#define strchrnul gitstrchrnul
static inline char *gitstrchrnul(const char *s, int c)
{
while (*s && *s != c)
s++;
return (char *)s;
}
#endifThalia