Skip to content

Commit

Permalink
git-svn: avoid extra get_log calls when refspecs are added for fetching
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Wong committed Feb 23, 2007
1 parent ef70de9 commit 502c1bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -2370,7 +2370,12 @@ sub gs_fetch_loop_common {
skip_unknown_revs($err);
};
foreach my $gs (@gs) {
$self->get_log([$gs->{path}], $min, $max, 0, 1, 1, sub
my $min_r = $min;
my $rdb_max = $gs->rev_db_max;
next if $rdb_max >= $max;
$min_r = $rdb_max + 1 if ($rdb_max > $min_r);
$self->get_log([$gs->{path}], $min_r, $max,
0, 1, 1, sub
{ my ($paths, $rev) = @_;
push @{$revs{$rev}},
[ $gs,
Expand Down

0 comments on commit 502c1bf

Please sign in to comment.