@matheusbsbs / matheus-bagliano / commits / 502c1bf629
Fork 0

git-svn: avoid extra get_log calls when refspecs are added for fetching

Since fetch_loop_common starts from the lowest revision number in a group of Git::SVN objects; we want to avoid refetching get_log for current users for things we've already cut it. Signed-off-by: Eric Wong <normalperson@yhbt.net>

Eric Wong committed Feb 1, 2007 at 04:26 UTC 502c1bf629154b4a248105b10346a06a6ff07387
1 file changed +6 -1
git-svn.perl
+6 -1
@@ -2370,7 +2370,12 @@ sub gs_fetch_loop_common {
2370 skip_unknown_revs($err);
2371 };
2372 foreach my $gs (@gs) {
2373 - $self->get_log([$gs->{path}], $min, $max, 0, 1, 1, sub
2373 + my $min_r = $min;
2374 + my $rdb_max = $gs->rev_db_max;
2375 + next if $rdb_max >= $max;
2376 + $min_r = $rdb_max + 1 if ($rdb_max > $min_r);
2377 + $self->get_log([$gs->{path}], $min_r, $max,
2378 + 0, 1, 1, sub
2379 { my ($paths, $rev) = @_;
2380 push @{$revs{$rev}},
2381 [ $gs,