Re: [PATCH] gpg-interface: fix for gpgsm v2.3
- From
Todd Zullinger <tmz@pobox.com>
- Date
- Feb 3, 2022, 22:07 UTC
- Message-ID
- <YfxSCbmatoSZlTwB@pobox.com>
- In-Reply-To
- <xmqqsfszr5q6.fsf@gitster.g>
Junio C Hamano wrote:
Show 10 quoted lines
> Todd Zullinger <tmz@pobox.com> writes: > >> - ret |= !strstr(gpg_status.buf, "\n[GNUPG:] SIG_CREATED "); >> + string_list_split_in_place(&lines, gpg_status.buf, '\n', -1); >> + ret |= !unsorted_string_list_has_string(&lines, "[GNUPG:] SIG_CREATED "); > > Is "SIG_CREATED " supposed to be at the end of that line? I thought > that has_string() asks for an exact match, and unfortunately(?) > there is not the string_list_has_string_that_has_this_prefix() > function. So...
By default, yes. The string_list struct uses strcmp() if no cmp function is given. That's why the previous chunk has:
struct string_list lines = { .cmp = starts_with };There aren't any similar uses in the code, which is just one of the reasons I wasn't confident that it was a good idea or even a good implementation.
-- Todd