summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorAndreas Heiduk <asheiduk@gmail.com>2018-03-04 11:22:36 (GMT)
committerEric Wong <e@80x24.org>2018-04-05 06:55:02 (GMT)
commit9c18398f8b75f34c2251224c9443b4e1271ff9ff (patch)
treea5d33fce1eecaee036de5a0299d1927b0d350e92 /git-svn.perl
parent468165c1d8a442994a825f3684528361727cd8c0 (diff)
downloadgit-9c18398f8b75f34c2251224c9443b4e1271ff9ff.zip
git-9c18398f8b75f34c2251224c9443b4e1271ff9ff.tar.gz
git-9c18398f8b75f34c2251224c9443b4e1271ff9ff.tar.bz2
git-svn: search --authors-prog in PATH too
In 36db1eddf9 ("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: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Eric Wong <e@80x24.org>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index a6b6c3e..050f2a3 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -374,7 +374,8 @@ version() if $_version;
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)$/) {