summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-04-15 10:01:29 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-17 10:33:22 (GMT)
commitd627de6b13138257dac3fcb4d7778d8afdcab974 (patch)
tree9e92cf3c82623e9055fee610d27b9d570dd2ca57 /git-svn.perl
parent91776491da19f1b72e1cd192c9ea42bb1aae4415 (diff)
downloadgit-d627de6b13138257dac3fcb4d7778d8afdcab974.zip
git-d627de6b13138257dac3fcb4d7778d8afdcab974.tar.gz
git-d627de6b13138257dac3fcb4d7778d8afdcab974.tar.bz2
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>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl5
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) {