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

[PATCH] svn: Honor --prefix option in init without --stdlayout

From
Adam Brewster <adambrewster@gmail.com>
Date
Aug 4, 2009, 01:40 UTC
Message-ID
<1249350039-7338-3-git-send-email-adambrewster@gmail.com>
In-Reply-To
<1249350039-7338-2-git-send-email-adambrewster@gmail.com>
Most users who type
  git svn init file:///tmp/repo --prefix=my-svn/
would expect the root of the svn repository to be tracked by
refs/remotes/my-svn/git-svn.
---
 git-svn.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 9369acc..51e3f92 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3266,7 +3266,8 @@ sub _new {
 		$repo_id = $Git::SVN::default_repo_id;
 	}
 	unless (defined $ref_id && length $ref_id) {
-		$_[2] = $ref_id = $Git::SVN::default_ref_id;
+		$_prefix = '' unless defined($_prefix);
+		$_[2] = $ref_id = $_prefix . $Git::SVN::default_ref_id;
 	}
 	$_[1] = $repo_id;
 	my $dir = "$ENV{GIT_DIR}/svn/$ref_id";
-- 
1.6.0.6
Previous: Adam BrewsterNext: Adam Brewster
Message 3 of 12 in “svn manipulate refs ourside refs/remotes”
  1. svn manipulate refs ourside refs/remotesAdam Brewster, Aug 4, 2009
  2. svn: Add && to t9107-git-svn-migrarte.shAdam Brewster, Aug 4, 2009
  3. svn: Honor --prefix option in init without --stdlayoutAdam Brewster, Aug 4, 2009
  4. svn: allow git-svn to update remotes outside of refs/remotesAdam Brewster, Aug 4, 2009
  5. Eric WongAug 10, 2009
  6. Eric WongAug 6, 2009
  7. Eric WongAug 10, 2009
  8. Adam BrewsterAug 12, 2009
  9. svn: allow branches outside of refs/remotesAdam Brewster, Aug 12, 2009
  10. Eric WongAug 12, 2009
  11. Adam BrewsterAug 13, 2009
  12. Eric WongAug 13, 2009

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.