Re: [PATCH v5 00/13] send-email: various optimizations to speed up by >2x
- From
Jeff King <peff@peff.net>
- Date
- May 31, 2021, 05:48 UTC
- Message-ID
- <YLR4tMOvkR81+ACq@coredump.intra.peff.net>
- In-Reply-To
- <cover-00.13-00000000000-20210528T092228Z-avarab@gmail.com>
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:
Show 16 quoted lines
> @@ 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