From d627de6b13138257dac3fcb4d7778d8afdcab974 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 15 Apr 2007 03:01:29 -0700 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- git-svn.perl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-svn.perl b/git-svn.perl index ac44f60b8..7ebd07b79 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -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) { -- 2.30.2