@matheusbsbs / matheus-bagliano / commits / 2bc35dcbf7
Fork 0

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 <alex@chmrr.net> Acked-by: Eric Wong <normalperson@yhbt.net>

Alex Vandiver committed Dec 8, 2009 at 15:54 UTC 2bc35dcbf7ed702e92b925f8e50afe3632dd211b
1 file changed +3 -1
git-svn.perl
+3 -1
@@ -392,9 +392,11 @@ sub cmd_clone {
392 $path = $url;
393 }
394 $path = basename($url) if !defined $path || !length $path;
395 + my $authors_absolute = $_authors ? File::Spec->rel2abs($_authors) : "";
396 cmd_init($url, $path);
397 Git::SVN::fetch_all($Git::SVN::default_repo_id);
397 - command_oneline('config', 'svn.authorsfile', $_authors) if $_authors;
398 + command_oneline('config', 'svn.authorsfile', $authors_absolute)
399 + if $_authors;
400 }
401
402 sub cmd_init {