@matheusbsbs / matheus-bagliano / commits / d627de6b13
Fork 0

git-svn: respect lower bound of -r/--revision when following parent

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>

Eric Wong committed Apr 15, 2007 at 03:01 UTC d627de6b13138257dac3fcb4d7778d8afdcab974
1 file changed +4 -1
git-svn.perl
+4 -1
@@ -1682,7 +1682,10 @@ sub find_parent_branch {
1682 }
1683 my ($r0, $parent) = $gs->find_rev_before($r, 1);
1684 if (!defined $r0 || !defined $parent) {
1685 - $gs->fetch(0, $r);
1685 + my ($base, $head) = parse_revision_argument(0, $r);
1686 + if ($base <= $r) {
1687 + $gs->fetch($base, $r);
1688 + }
1689 ($r0, $parent) = $gs->last_rev_commit;
1690 }
1691 if (defined $r0 && defined $parent) {