summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-02-01 12:26:00 (GMT)
committerEric Wong <normalperson@yhbt.net>2007-02-23 08:57:11 (GMT)
commit502c1bf629154b4a248105b10346a06a6ff07387 (patch)
treeeea671113364b733248ec50a18e0dae884ca322f /git-svn.perl
parentef70de968509c447f5c02f4ba99f1cf0cadf5c1f (diff)
downloadgit-502c1bf629154b4a248105b10346a06a6ff07387.zip
git-502c1bf629154b4a248105b10346a06a6ff07387.tar.gz
git-502c1bf629154b4a248105b10346a06a6ff07387.tar.bz2
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>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 58d0600..8c24012 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -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,