From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id CF5221F68D for ; Fri, 27 Oct 2023 09:40:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1698399640; bh=S4kZY2+hf//8GC5M1aXrWReYxdMGHQs6R7z3aF4P6qg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MPyqomLdPP9IIfwVfgkDvZGuvqQ3xEKrVJPwx5PzaoEnTjr8q3GYm/aoo1kPTTwO/ R25QWq4ymPN+2phPmNMcrB+LQ26PZJP8KlOJk5lbaHvnIQ5FuRKyvZjMz5Rh4/YAt5 BF3eazr+ylec/1bwvEVrh9z5DuCuv+V5p9j2cIS4= From: Eric Wong To: spew@80x24.org Subject: [PATCH 06/18] import: use run_qx Date: Fri, 27 Oct 2023 09:40:27 +0000 Message-ID: <20231027094039.3788289-6-e@80x24.org> In-Reply-To: <20231027094039.3788289-1-e@80x24.org> References: <20231027094039.3788289-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: --- lib/PublicInbox/Import.pm | 6 ++---- 1 file 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"; } }