OSDN Git Service

git-svn: save a little memory as fetch progresses
authorEric Wong <normalperson@yhbt.net>
Sat, 25 Oct 2014 07:56:12 +0000 (07:56 +0000)
committerEric Wong <normalperson@yhbt.net>
Sat, 25 Oct 2014 07:56:33 +0000 (07:56 +0000)
There is no reason to keep entries in the %revs hash after we're
done processing a revision, so allow entries become freed as
processing continues.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
perl/Git/SVN/Ra.pm

index e326849..5bc5b4e 100644 (file)
@@ -431,7 +431,7 @@ sub gs_fetch_loop_common {
 
                my %exists = map { $_->path => $_ } @$gsv;
                foreach my $r (sort {$a <=> $b} keys %revs) {
-                       my ($paths, $logged) = @{$revs{$r}};
+                       my ($paths, $logged) = @{delete $revs{$r}};
 
                        foreach my $gs ($self->match_globs(\%exists, $paths,
                                                           $globs, $r)) {