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 E3A141F69D for ; Fri, 27 Oct 2023 01:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1698369284; bh=S4kZY2+hf//8GC5M1aXrWReYxdMGHQs6R7z3aF4P6qg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jRtioDMfUWKqH3nsl3pzDnD1XwZU5cNPiqgXhFTo2FlxfA6Nn3Wa1ojikdwv1bsqz 8BwZqoxxvGhE9cAacxeANqpGBBRk490IoBtQviOiopR5RjSGa3D0nYbeuekCLdqPm3 i24xAotXuhPhpUWl+UDfgSqxDdQFmsaT5W/qVqms= From: Eric Wong To: spew@80x24.org Subject: [PATCH 7/8] import: use run_qx Date: Fri, 27 Oct 2023 01:14:42 +0000 Message-ID: <20231027011443.3709841-7-e@80x24.org> In-Reply-To: <20231027011443.3709841-1-e@80x24.org> References: <20231027011443.3709841-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"; } }