Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Vandiver <alex@chmrr.net>2009-12-08 23:54:10 +0300
committerEric Wong <normalperson@yhbt.net>2009-12-09 07:38:39 +0300
commit2bc35dcbf7ed702e92b925f8e50afe3632dd211b (patch)
tree81ea66bd2cd0a2aa1dbae5797e9d4755c8a2ab7c /git-svn.perl
parentf9ad77a739c0d012ee58b64eda2d7ec0d4e1df9d (diff)
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>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 5a52068b12..dc0e711593 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 {