-my $fh = $git->popen(@cat);
-my $vec = '';
-vec($vec, fileno($fh), 1) = 1;
-select($vec, undef, undef, 60) or die "timed out waiting for --batch-check";
+my $fh = $blob ? undef : $git->popen(@cat);
+if ($fh) {
+ my $vec = '';
+ vec($vec, fileno($fh), 1) = 1;
+ select($vec, undef, undef, 60) or
+ die "timed out waiting for --batch-check";
+}