]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
git: quiet down `rev-parse --git-path' errors
authorEric Wong <e@80x24.org>
Fri, 15 Dec 2023 20:22:48 +0000 (15:22 -0500)
committerEric Wong <e@80x24.org>
Sat, 16 Dec 2023 10:06:30 +0000 (10:06 +0000)
This fixes t/mda.t with git 1.8.5

lib/PublicInbox/Git.pm

index 9c4d938e93623378fd4efcac9ba4fc1412468b9b..6c4fcf9328cd78b0b04678ba2b2dd4fa25ebd6f9 100644 (file)
@@ -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