From 9f5a583694396f84056b9d92255bba0197b52bc8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 10 Jan 2020 09:14:19 +0000 Subject: spawn (and thus popen_rd) die on failure Most spawn and popen_rd callers die on failure to spawn, anyways, and some are missing checks entirely. This saves us a bunch of verbose error-checking code in callers. This also makes popen_rd more consistent, since it already dies on pipe creation failures. --- lib/PublicInbox/WwwListing.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/PublicInbox/WwwListing.pm') diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm index a52dba11..8d610037 100644 --- a/lib/PublicInbox/WwwListing.pm +++ b/lib/PublicInbox/WwwListing.pm @@ -136,9 +136,7 @@ sub fingerprint ($) { my ($git) = @_; # TODO: convert to qspawn for fairness when there's # thousands of repos - my ($fh, $pid) = $git->popen('show-ref') or - die "popen($git->{git_dir} show-ref) failed: $!"; - + my ($fh, $pid) = $git->popen('show-ref'); my $dig = Digest::SHA->new(1); while (read($fh, my $buf, 65536)) { $dig->add($buf); -- cgit v1.2.3-24-ge0c7