about summary refs log tree commit homepage
path: root/xt/git_async_cmp.t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-01-11 22:35:01 +0000
committerEric Wong <e@yhbt.net>2020-01-13 04:36:45 +0000
commite67159e720994c7442636a7d5250ea8a49a85b28 (patch)
tree8937f3d7e83afda4be57312908bbdab239ecb088 /xt/git_async_cmp.t
parentd4e33279556d7eed492f4e3ba0deade9a31b4aeb (diff)
downloadpublic-inbox-e67159e720994c7442636a7d5250ea8a49a85b28.tar.gz
I somehow thought "foreach (<$cat>)" could work like
"while (<$cat>)" when it came to iterating over file
handles...
Diffstat (limited to 'xt/git_async_cmp.t')
-rw-r--r--xt/git_async_cmp.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/xt/git_async_cmp.t b/xt/git_async_cmp.t
index f8ffe3d9..18fce3db 100644
--- a/xt/git_async_cmp.t
+++ b/xt/git_async_cmp.t
@@ -27,7 +27,7 @@ my $async = timeit($nr, sub {
         my $cat = $git->popen(@cat);
         $git->cat_async_begin;
 
-        foreach (<$cat>) {
+        while (<$cat>) {
                 my ($oid, undef, undef) = split(/ /);
                 $git->cat_async($oid, $cb);
         }
@@ -39,7 +39,7 @@ my $async = timeit($nr, sub {
 my $sync = timeit($nr, sub {
         my $dig = Digest::SHA->new(1);
         my $cat = $git->popen(@cat);
-        foreach (<$cat>) {
+        while (<$cat>) {
                 my ($oid, undef, undef) = split(/ /);
                 my $bref = $git->cat_file($oid);
                 $dig->add($$bref);