]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-svn: respect lower bound of -r/--revision when following parent
authorEric Wong <normalperson@yhbt.net>
Sun, 15 Apr 2007 10:01:29 +0000 (03:01 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 17 Apr 2007 10:33:22 +0000 (03:33 -0700)
When an explicit --revision argument is specified, do not fetch
past the specified range into the beginning of history.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-svn.perl

index ac44f60b81412753248c78fbe73fe7f6a212b6df..7ebd07b7936e51f7f5f68f3bd2fc8cd08eef53db 100755 (executable)
@@ -1682,7 +1682,10 @@ sub find_parent_branch {
        }
        my ($r0, $parent) = $gs->find_rev_before($r, 1);
        if (!defined $r0 || !defined $parent) {
-               $gs->fetch(0, $r);
+               my ($base, $head) = parse_revision_argument(0, $r);
+               if ($base <= $r) {
+                       $gs->fetch($base, $r);
+               }
                ($r0, $parent) = $gs->last_rev_commit;
        }
        if (defined $r0 && defined $parent) {