From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id CB8471F5A0 for ; Sat, 4 Feb 2023 11:17:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233338AbjBDLR0 (ORCPT ); Sat, 4 Feb 2023 06:17:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232000AbjBDLRY (ORCPT ); Sat, 4 Feb 2023 06:17:24 -0500 Received: from cloud.peff.net (cloud.peff.net [104.130.231.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1690F30B0A for ; Sat, 4 Feb 2023 03:17:22 -0800 (PST) Received: (qmail 3494 invoked by uid 109); 4 Feb 2023 11:17:22 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Sat, 04 Feb 2023 11:17:22 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 18097 invoked by uid 111); 4 Feb 2023 11:17:22 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Sat, 04 Feb 2023 06:17:22 -0500 Authentication-Results: peff.net; auth=none Date: Sat, 4 Feb 2023 06:17:21 -0500 From: Jeff King To: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Cc: demerphq , "D. Ben Knoble" , git@vger.kernel.org Subject: Re: grep: fix multibyte regex handling under macOS (1819ad327b7a1f19540a819813b70a0e8a7f798f) Message-ID: References: <230203.86357mbe8x.gmgdl@evledraar.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <230203.86357mbe8x.gmgdl@evledraar.gmail.com> Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Feb 03, 2023 at 10:56:53PM +0100, Ævar Arnfjörð Bjarmason wrote: > > I don't have a strong opinion either way. The main concern I'd have is > > handling dependencies. I like pcre a lot, but I'm not sure that I would > > want building Git to require pcre on every platform. If there's an > > engine we can ship as a vendored dependency that builds everywhere, that > > helps. > > We can just make that fallback engine be PCRE. I submitted patches a > while ago to include a minimal version of it in compat/pcre, as we seem > to have some allergy to external dependencies: > https://lore.kernel.org/git/20170511175115.648-1-avarab@gmail.com/ > > It's ~80k lines instead of compat/regex's ~15k, but it's actually > maintained, and would be much easier to upgrade. I'm OK with that if we really think that libpcre will build without problems on every platform that Git does. I don't know if we have any data there. Obviously libpcre builds lots of places, but will we have problems on obscure platforms like NonStop? Part of me wants to not care, but if the value here is saying "the regex engine is always going to be X", then there is not much point in saying "the regex engine is usually X, but you can't rely on it because sometimes it's not". "Usually" is enough for helping users quality of life (if we help 99% of users, that is good). It isn't enough for making assumptions in the code (like using constructs in userdiff regexes that would break horribly on the other 1% of platforms). -Peff