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

[PATCH 1/2] git-svn: Set svn.authorsfile to an absolute path when cloning

From
Alex Vandiver <alex@chmrr.net>
Date
Dec 8, 2009, 20:54 UTC
Message-ID
<1260305651-11111-1-git-send-email-alex@chmrr.net>

If --authors-file is passed a relative path, cloning will work, but future `git svn fetch`es will fail to locate the authors file correctly. Thus, use File::Spec->rel2abs to determine an absolute path for the authors file before setting it.

Signed-off-by: Alex Vandiver <alex@chmrr.net>
---
 git-svn.perl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 957d44e..cf5e75e 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -392,9 +392,11 @@ sub cmd_clone {
 		$path = $url;
 	}
 	$path = basename($url) if !defined $path || !length $path;
+	my $authors_absolute = $_authors ? File::Spec->rel2abs($_authors) : "";
 	cmd_init($url, $path);
 	Git::SVN::fetch_all($Git::SVN::default_repo_id);
-	command_oneline('config', 'svn.authorsfile', $_authors) if $_authors;
+	command_oneline('config', 'svn.authorsfile', $authors_absolute)
+	    if $_authors;
 }
 
 sub cmd_init {
-- 
1.6.6.rc0.360.gc408
Next: Alex Vandiver
Message 1 of 3 in “git-svn: Set svn.authorsfile to an absolute path when cloning”
  1. 1/2 git-svn: Set svn.authorsfile to an absolute path when cloningAlex Vandiver, Dec 8, 2009
  2. 2/2 git-svn: Move setting of svn.authorsfile in clone to between init and fetchAlex Vandiver, Dec 8, 2009
  3. Eric WongDec 9, 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.