зеркало из https://github.com/microsoft/git.git
git-svn: speed up find_rev_before
By limiting start revision of find_rev_before to max existing revision. This avoids a long wait if you do 'git svn reset -r 9999999'. The linear search within the contiguous revisions doesn't seem to be a problem. [ew: expanded commit message] Signed-off-by: Ben Jackson <ben@ben.com> Acked-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:
Родитель
9a8c92ac9e
Коммит
ca5e880ec2
|
@ -3171,6 +3171,8 @@ sub find_rev_before {
|
|||
my ($self, $rev, $eq_ok, $min_rev) = @_;
|
||||
--$rev unless $eq_ok;
|
||||
$min_rev ||= 1;
|
||||
my $max_rev = $self->rev_map_max;
|
||||
$rev = $max_rev if ($rev > $max_rev);
|
||||
while ($rev >= $min_rev) {
|
||||
if (my $c = $self->rev_map_get($rev)) {
|
||||
return ($rev, $c);
|
||||
|
|
Загрузка…
Ссылка в новой задаче