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,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 CDAE71F47C; Fri, 27 Jan 2023 08:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1674807443; bh=nlox0P/8Zp4iBvxsVNX62/SiWPElng25vyUsPH+VZfk=; h=Date:From:To:Subject:References:In-Reply-To:From; b=dTujb7VTyiSAjBn2PinSclG3dL5Q09QWn1xvoGg7w8qVLI2JCHGNHvxI4+NyWFHfo 9Zebu77W46cZ9MiEIsq3vozroUAYShq8b/65DS+tq1DU0SleEavHB8I9C/g6FSSL0q VsM9hoXudlRDcT2i5VWKZ0/JDg9b+J6R1ciefN+k= Date: Fri, 27 Jan 2023 08:17:23 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: [PATCH 1/2] git: use --batch-command in git 2.36+ to save processes Message-ID: <20230127081723.M796329@dcvr> References: <20230126093257.1058494-1-e@80x24.org> <20230126093257.1058494-2-e@80x24.org> <20230127081421.M411750@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230127081421.M411750@dcvr> List-Id: t/nntpd.t and t/nntpd-v2.t also need a fix on my 32-bit machine which lacks libgit2 (and in retrospect, same problem w/ the previous fix for t/imapd.t) The change to PublicInbox/Git.pm isn't necessary, but it looks a bit nicer since I stopped passing `--' in to that sub and only add `--' when invoking the command. diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index a9db8ad7..3e2b435c 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -157,7 +157,7 @@ sub _bidi_pipe { my @cmd = ($GIT_EXE, "--git-dir=$gd", '-c', "core.abbrev=$abbr", 'cat-file', "--$batch"); if ($err) { - my $id = "git.$self->{git_dir}$batch.err"; + my $id = "git.$self->{git_dir}.$batch.err"; my $fh = tmpfile($id) or $self->fail("tmpfile($id): $!"); $self->{$err} = $fh; $rdr->{2} = $fh; diff --git a/t/nntpd.t b/t/nntpd.t index 30233ce0..bebf4203 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -365,7 +365,7 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000 ($^O =~ /\A(?:linux)\z/) or skip "lsof /(deleted)/ check untested on $^O", 1; my @lsof = xqx([$lsof, '-p', $td->{pid}], undef, $noerr); - my $d = [ grep(/\(deleted\)/, @lsof) ]; + my $d = [ grep(/\(deleted\)/, grep(!/batch-command\.err/, @lsof)) ]; is_deeply($d, [], 'no deleted files') or diag explain($d); }; SKIP: { test_watch($tmpdir, $host_port, $group) };