]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
cfgwr: fix non-libgit2 case
authorEric Wong <e@80x24.org>
Wed, 19 Feb 2025 12:39:26 +0000 (12:39 +0000)
committerEric Wong <e@80x24.org>
Wed, 19 Feb 2025 19:26:10 +0000 (19:26 +0000)
libgit2 isn't installed on all my test machines, and the
addition of libgit2 support was careless in that it failed to
test the non-libgit2 case thoroughly :x

Fixes: a8073f6c (lg2: use cfgwr_commit to write to configs using libgit2, 2025-02-15)
lib/PublicInbox/CfgWr.pm

index 39f22e19e09c4be3942f373e864beee284af1f39..73243f24165b4088df05eb5ef0227f6b2b30bcc6 100644 (file)
@@ -45,7 +45,7 @@ sub commit {
        my $todo = delete $self->{todo} // return;
        return $cfgwr_commit->($self->{-f}, $todo) if $cfgwr_commit;
        my @x = (git_exe, 'config', '-f', $self->{-f});
-       for my $c (@{delete $self->{todo} // []}) {
+       for my $c (@$todo) {
                unshift @$c, @x;
                if ($c->[scalar(@x)] eq '--unset-all') {
                        run_wait $c, undef, $opt;