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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 git-svn.perl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index ac44f60..7ebd07b 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) {
-- 
1.5.1.1.98.gedb4f

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]