git svn: handle SVN merges from revisions past the tip of the branch
[gitweb.git] / git-svn.perl
index 6a3b501d24ebaa50e297511ccf0b18e3bbd2bb16..27fbe3063bfab8be3c67a7879f63ba977556ad1b 100755 (executable)
@@ -2950,8 +2950,11 @@ sub find_extra_svn_parents {
                        my $bottom_commit =
                                $gs->rev_map_get($bottom, $self->ra_uuid) ||
                                $gs->rev_map_get($bottom+1, $self->ra_uuid);
-                       my $top_commit =
-                               $gs->rev_map_get($top, $self->ra_uuid);
+                       my $top_commit;
+                       for (; !$top_commit && $top >= $bottom; --$top) {
+                               $top_commit =
+                                       $gs->rev_map_get($top, $self->ra_uuid);
+                       }
 
                        unless ($top_commit and $bottom_commit) {
                                warn "W:unknown path/rev in svn:mergeinfo "