From: Eric Wong Date: Wed, 19 Feb 2025 12:39:26 +0000 (+0000) Subject: cfgwr: fix non-libgit2 case X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8e2716f10c6e86deba78cdc22d4f91406389330;p=thirdparty%2Fpublic-inbox.git cfgwr: fix non-libgit2 case 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) --- diff --git a/lib/PublicInbox/CfgWr.pm b/lib/PublicInbox/CfgWr.pm index 39f22e19e..73243f241 100644 --- a/lib/PublicInbox/CfgWr.pm +++ b/lib/PublicInbox/CfgWr.pm @@ -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;