diff options
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/git-svn.perl b/git-svn.perl index e35006142a..58f7dd0957 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -3072,11 +3072,8 @@ sub gs_do_switch { $editor->{git_commit_ok}; } -sub gs_fetch_loop_common { - my ($self, $base, $head, $gsv, $globs) = @_; - return if ($base > $head); - my $inc = $_log_window_size; - my ($min, $max) = ($base, $head < $base + $inc ? $head : $base + $inc); +sub longest_common_path { + my ($gsv, $globs) = @_; my %common; my $common_max = scalar @$gsv; @@ -3108,6 +3105,15 @@ sub gs_fetch_loop_common { last; } } + $longest_path; +} + +sub gs_fetch_loop_common { + my ($self, $base, $head, $gsv, $globs) = @_; + return if ($base > $head); + my $inc = $_log_window_size; + my ($min, $max) = ($base, $head < $base + $inc ? $head : $base + $inc); + my $longest_path = longest_common_path($gsv, $globs); while (1) { my %revs; my $err; |