about summary refs log tree commit homepage
path: root/lib/PublicInbox/Config.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-20 06:30:16 +0000
committerEric Wong <e@80x24.org>2020-12-20 20:39:15 +0000
commitfb7d958dbc601f126dc391d915f5935d4cfc595e (patch)
tree6a0ffa8d1fd94b9fcc99d095e10c77944511d66a /lib/PublicInbox/Config.pm
parente77241850763dea9995381f3c0c7b354aa791cc0 (diff)
downloadpublic-inbox-fb7d958dbc601f126dc391d915f5935d4cfc595e.tar.gz
We can rely on implicit join in string interpolation on die()
iff needed.

And just creating the arrayref up front to avoid an extra
backslash seems nicer at the moment.
Diffstat (limited to 'lib/PublicInbox/Config.pm')
-rw-r--r--lib/PublicInbox/Config.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm
index 199ce019..2f5c83cd 100644
--- a/lib/PublicInbox/Config.pm
+++ b/lib/PublicInbox/Config.pm
@@ -163,11 +163,10 @@ sub config_fh_parse ($$$) {
 sub git_config_dump {
         my ($file) = @_;
         return {} unless -e $file;
-        my @cmd = (qw/git config -z -l --includes/, "--file=$file");
-        my $cmd = join(' ', @cmd);
-        my $fh = popen_rd(\@cmd);
+        my $cmd = [ qw(git config -z -l --includes), "--file=$file" ];
+        my $fh = popen_rd($cmd);
         my $rv = config_fh_parse($fh, "\0", "\n");
-        close $fh or die "failed to close ($cmd) pipe: $?";
+        close $fh or die "failed to close (@$cmd) pipe: $?";
         $rv;
 }