Subject: Re: [PATCH 3/2] commit: remove find_header_mem()

From: Junio C Hamano <[email-masked]>
Date: Thu, 20 Jun 2024 11:12:37 -0700

Jeff King <[email-masked]> writes:

>> +const char *find_commit_header(const char *msg, const char *key, size_t *out_len)
>>  {
>>  	int key_len = strlen(key);
>>  	const char *line = msg;
>
> Not new in your patch, but assigning strlen() to int tingled my
> spider-sense. It's OK, though, because "key" is always a small string
> literal.

Yup.  All callers of find_commit_header() give in-program constants
and never an externally sourced random string there.

> So the conversion looks good to me.

Thanks.  Will queue.