From: Alex Vandiver <alex@chmrr.net>
To: git@vger.kernel.org
Cc: Eric Wong <normalperson@yhbt.net>
Subject: [PATCH 1/2] git-svn: Set svn.authorsfile to an absolute path when cloning
Date: Tue, 8 Dec 2009 15:54:10 -0500 [thread overview]
Message-ID: <1260305651-11111-1-git-send-email-alex@chmrr.net> (raw)
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 reply other threads:[~2009-12-08 20:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 20:54 Alex Vandiver [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1260305651-11111-1-git-send-email-alex@chmrr.net \
--to=alex@chmrr.net \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox