From: Alex Vandiver Date: Tue, 8 Dec 2009 20:54:10 +0000 (-0500) Subject: git-svn: Set svn.authorsfile to an absolute path when cloning X-Git-Tag: v1.6.6-rc2~5^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2bc35dcbf7ed702e92b925f8e50afe3632dd211b;p=git.git git-svn: Set svn.authorsfile to an absolute path when cloning 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 Acked-by: Eric Wong --- diff --git a/git-svn.perl b/git-svn.perl index 5a52068b1..dc0e71159 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 {