From 9c18398f8b75f34c2251224c9443b4e1271ff9ff Mon Sep 17 00:00:00 2001 From: Andreas Heiduk Date: Sun, 4 Mar 2018 12:22:36 +0100 Subject: 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 Signed-off-by: Eric Wong --- git-svn.perl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'git-svn.perl') diff --git a/git-svn.perl b/git-svn.perl index a6b6c3e40c..050f2a36f4 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)$/) { -- cgit v1.2.3