git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
EWEric Wong <normalperson@yhbt.net>
Date
Apr 15, 2007, 10:01 UTC
Message-ID
<11766312891942-git-send-email-normalperson@yhbt.net>

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>
---
 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
Message 1 of 1 in “git-svn: respect lower bound of -r/--revision when following parent”
  1. git-svn: respect lower bound of -r/--revision when following parentEric Wong, Apr 15, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.