lib/PublicInbox/V2Writable.pm | 6 ++++++ diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index fd93ac2732ee575c365bec3c6468466434e3acde..76844cd45a0f046b91a35263e9de046899f37f77 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -831,6 +831,12 @@ $pr->("$i.git indexing all of $tip") if $pr; return $tip; # all of it }; + # fast equality check to avoid (v)fork+execve overhead + if ($cur eq $tip) { + $sync->{ranges}->[$i] = undef; + return; + } + my $range = "$cur..$tip"; $pr->("$i.git checking contiguity... ") if $pr; if (is_ancestor($git, $cur, $tip)) { # common case