]> Sergey Matveev's repositories - public-inbox.git/commitdiff
convert: avoid redundant "done\n" statement for fast-import
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Fri, 30 Mar 2018 20:31:48 +0000 (20:31 +0000)
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Fri, 30 Mar 2018 20:34:41 +0000 (20:34 +0000)
This bug was hidden due to timing problems with eatmydata or
running with tmpfs for TMPDIR.

script/public-inbox-convert

index 2b0a385e15cf70615f73403497a45819658e1b35..e6fb4f5f3cb11868e9ad72092bfc5bcce7faa0ec 100755 (executable)
@@ -91,9 +91,8 @@ while (<$rd>) {
                        $from = $1;
                        # no next
                }
-       } elsif ($_ eq "done\n") {
-               last;
        }
+       last if $_ eq "done\n";
        $w->print($_) or $im->wfail;
 }
 $w = $r = undef;