diff options
author | Eric Wong <e@80x24.org> | 2023-10-27 22:21:13 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-28 09:08:18 +0000 |
commit | 73830410e4336b779c820e90a8604e9e74f38b90 (patch) | |
tree | 92962cefd15d77edb12c57d08cc89b0d37110d67 /lib/PublicInbox/Import.pm | |
parent | ef5bd67cbcdcd8cba2cb8b3718ea90afda6b7ebe (diff) | |
download | public-inbox-73830410e4336b779c820e90a8604e9e74f38b90.tar.gz |
This saves us some code, and is a small step towards getting ProcessIO working with stat, fcntl and other perlops that don't work with tied handles.
Diffstat (limited to 'lib/PublicInbox/Import.pm')
-rw-r--r-- | lib/PublicInbox/Import.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index fb70b91b..6eee8774 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -8,7 +8,7 @@ package PublicInbox::Import; use v5.12; use parent qw(PublicInbox::Lock); -use PublicInbox::Spawn qw(run_die popen_rd spawn); +use PublicInbox::Spawn qw(run_die run_qx spawn); use PublicInbox::MID qw(mids mid2path); use PublicInbox::Address; use PublicInbox::Smsg; @@ -25,10 +25,8 @@ use PublicInbox::Git qw(read_all); sub default_branch () { state $default_branch = do { - my $r = popen_rd([qw(git config --global init.defaultBranch)], + my $h = run_qx([qw(git config --global init.defaultBranch)], { GIT_CONFIG => undef }); - chomp(my $h = <$r> // ''); - CORE::close $r; $h eq '' ? 'refs/heads/master' : "refs/heads/$h"; } } |