From: Eric Wong Date: Tue, 26 Sep 2023 07:44:38 +0000 (+0000) Subject: fetch: fix missing chdir arg for error reporting X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bb5d85daf061ca1a9ab886fa3c4129eb9e18651;p=thirdparty%2Fpublic-inbox.git fetch: fix missing chdir arg for error reporting We need to run `git config -l' in the epoch directory which failed to get the proper config listing. This went unnoticed because it doesn't affect any known users and was only found during code inspection for waitpid usage cleanups. --- diff --git a/lib/PublicInbox/Fetch.pm b/lib/PublicInbox/Fetch.pm index f93eeebea..8f3a87e22 100644 --- a/lib/PublicInbox/Fetch.pm +++ b/lib/PublicInbox/Fetch.pm @@ -131,8 +131,9 @@ sub do_fetch { # main entry point $epoch = $nr; } else { warn "W: $edir missing remote.*.url\n"; - my $pid = spawn([qw(git config -l)], undef, - { 1 => $lei->{2}, 2 => $lei->{2} }); + my $o = { -C => $edir }; + $o->{1} = $o->{2} = $lei->{2}; + my $pid = spawn([qw(git config -l)], undef, $o); waitpid($pid, 0); $lei->child_error($?) if $?; }