From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: * X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=1.6 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, LIST_MIRROR_RECEIVED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_CSS,URIBL_CSS_A shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 150B61F852 for ; Thu, 3 Feb 2022 22:07:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355673AbiBCWHJ (ORCPT ); Thu, 3 Feb 2022 17:07:09 -0500 Received: from pb-smtp2.pobox.com ([64.147.108.71]:53273 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbiBCWHJ (ORCPT ); Thu, 3 Feb 2022 17:07:09 -0500 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 64F88111311; Thu, 3 Feb 2022 17:07:08 -0500 (EST) (envelope-from tmz@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=date:from :to:cc:subject:message-id:references:mime-version:content-type :in-reply-to; s=sasl; bh=02uvMDQ2Hdu+eOmCRG0bu6LB8/NP0y0kE+lWtyO tS3U=; b=GVXWiSB5c35J9hJ8kplFHvwx/fu+9fiyfA/9qzULijQg3WyqCLhn848 /pjnqtt4BuvfgX4v0Ns5k4fR9a/luINl4KiCKBRyVlTe1+z+AkwVefXPuSGRRZez DHwSsLpLH7UujU0qJ8rO781vWVefT/yyfxFzRmzL4fZ0vSaE0wW4= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 58DB0111310; Thu, 3 Feb 2022 17:07:08 -0500 (EST) (envelope-from tmz@pobox.com) Received: from pobox.com (unknown [71.254.192.242]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id A189811130F; Thu, 3 Feb 2022 17:07:07 -0500 (EST) (envelope-from tmz@pobox.com) Date: Thu, 3 Feb 2022 17:07:05 -0500 From: Todd Zullinger To: Junio C Hamano Cc: Fabian Stelzer , git@vger.kernel.org, Henning Schild , "brian m . carlson" , Hans Jerry Illikainen Subject: Re: [PATCH] gpg-interface: fix for gpgsm v2.3 Message-ID: References: <20220203123724.47529-1-fs@gigacodes.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pobox-Relay-ID: A0B54702-853D-11EC-A463-CB998F0A682E-09356542!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Junio C Hamano wrote: > Todd Zullinger 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