dumping ground for random patches and texts
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: spew@80x24.org
Subject: [PATCH 4/5] git: quiet down `rev-parse --git-path' errors
Date: Thu, 14 Dec 2023 19:08:09 -0500	[thread overview]
Message-ID: <20231215000810.3458531-4-e@80x24.org> (raw)
In-Reply-To: <20231215000810.3458531-1-e@80x24.org>

This fixes t/mda.t with git 1.8.5
---
 lib/PublicInbox/Git.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index 9c4d938e..6c4fcf93 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -107,7 +107,9 @@ sub git_path ($$) {
 			$d;
 		} else {
 			local $/ = "\n";
-			my $s = $self->qx(qw(rev-parse --git-path), $path);
+			my $rdr = { 2 => \my $err };
+			my $s = $self->qx([qw(rev-parse --git-path), $path],
+					undef, $rdr);
 			chomp $s;
 
 			# git prior to 2.5.0 did not understand --git-path

  parent reply	other threads:[~2023-12-15  0:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15  0:08 [PATCH 1/5] tests: quiet uninitialized warnings on CentOS 7.x Eric Wong
2023-12-15  0:08 ` [PATCH 2/5] searchidx: quiet down old git patchid Eric Wong
2023-12-15  0:08 ` [PATCH 3/5] cindex: --prune needs git 2.6+ Eric Wong
2023-12-15  0:08 ` Eric Wong [this message]
2023-12-15  0:08 ` [PATCH 5/5] t/pop3d-limit: use v1 inbox to test on ancient git Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231215000810.3458531-4-e@80x24.org \
    --to=e@80x24.org \
    --cc=spew@80x24.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).