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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 0DD601F5AE for ; Mon, 31 May 2021 05:48:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbhEaFuS (ORCPT ); Mon, 31 May 2021 01:50:18 -0400 Received: from cloud.peff.net ([104.130.231.41]:41866 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbhEaFuQ (ORCPT ); Mon, 31 May 2021 01:50:16 -0400 Received: (qmail 20284 invoked by uid 109); 31 May 2021 05:48:37 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Mon, 31 May 2021 05:48:37 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 26622 invoked by uid 111); 31 May 2021 05:48:38 -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; Mon, 31 May 2021 01:48:38 -0400 Authentication-Results: peff.net; auth=none Date: Mon, 31 May 2021 01:48:36 -0400 From: Jeff King To: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Cc: git@vger.kernel.org, Junio C Hamano , Gregory Anders , =?utf-8?B?xJBvw6BuIFRy4bqnbiBDw7RuZw==?= Danh , Eric Sunshine , Eric Wong , Felipe Contreras Subject: Re: [PATCH v5 00/13] send-email: various optimizations to speed up by >2x Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, May 28, 2021 at 11:23:39AM +0200, Ævar Arnfjörð Bjarmason wrote: > Hopefully the final iteration. Updates a commit message to explain why > I moved away from File::Spec::Functions, rebases on master, and > explains and deals with the "undef in config" issue Jeff King noted. Thanks. The solution was less invasive than I feared. I guess here: > @@ git-send-email.perl: sub read_config { > - my @values = Git::config(@repo, $key); > - next unless @values; > + my @values = @{$known_keys->{$key}}; > ++ @values = grep { defined } @values; > next if $configured->{$setting}++; > @$target = @values; > } > else { > - my $v = Git::config(@repo, $key); > -- next unless defined $v; > + my $v = $known_keys->{$key}->[0]; > + next unless defined $v; > next if $configured->{$setting}++; > $$target = $v; > - } we'd ignore such undef values, whereas presumably before they'd have triggered an error via Git::config(). I don't think it matters all that much either way, though. -Peff