Commit 9c18398f authored by Andreas Heiduk's avatar Andreas Heiduk Committed by Eric Wong

git-svn: search --authors-prog in PATH too

In 36db1edd ("git-svn: add --authors-prog option", 2009-05-14) the path
to authors-prog was made absolute because git-svn changes the current
directory in some situations. This makes sense if the program is part of
the repository but prevents searching via $PATH.

The old behaviour is still retained, but if the file does not exists, then
authors-prog is searched for in $PATH as any other command.
Signed-off-by: default avatarAndreas Heiduk <asheiduk@gmail.com>
Signed-off-by: default avatarEric Wong <e@80x24.org>
parent 468165c1
......@@ -657,6 +657,11 @@ config key: svn.authorsfile
expected to return a single line of the form "Name <email>",
which will be treated as if included in the authors file.
+
Due to historical reasons a relative 'filename' is first searched
relative to the current directory for 'init' and 'clone' and relative
to the root of the working tree for 'fetch'. If 'filename' is
not found, it is searched like any other command in '$PATH'.
+
[verse]
config key: svn.authorsProg
......
......@@ -374,7 +374,8 @@ sub term_init {
usage(1) unless defined $cmd;
load_authors() if $_authors;
if (defined $_authors_prog) {
$_authors_prog = "'" . File::Spec->rel2abs($_authors_prog) . "'";
my $abs_file = File::Spec->rel2abs($_authors_prog);
$_authors_prog = "'" . $abs_file . "'" if -x $abs_file;
}
unless ($cmd =~ /^(?:clone|init|multi-init|commit-diff)$/) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment