Git development
 help / color / mirror / Atom feed
* [PATCH 1/2] git-svn: Set svn.authorsfile to an absolute path when cloning
@ 2009-12-08 20:54 Alex Vandiver
  2009-12-08 20:54 ` [PATCH 2/2] git-svn: Move setting of svn.authorsfile in clone to between init and fetch Alex Vandiver
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Vandiver @ 2009-12-08 20:54 UTC (permalink / raw)
  To: git; +Cc: Eric Wong

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-09  4:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-08 20:54 [PATCH 1/2] git-svn: Set svn.authorsfile to an absolute path when cloning Alex Vandiver
2009-12-08 20:54 ` [PATCH 2/2] git-svn: Move setting of svn.authorsfile in clone to between init and fetch Alex Vandiver
2009-12-09  4:44   ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox