From: Andreas Heiduk <asheiduk@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Eric Wong <e@80x24.org>, Andreas Heiduk <asheiduk@gmail.com>
Subject: [PATCH 1/2] git-svn: search --authors-prog in PATH too
Date: Sun, 4 Mar 2018 12:22:36 +0100 [thread overview]
Message-ID: <20180304112237.19254-1-asheiduk@gmail.com> (raw)
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
directoy 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 search in $PATH as any other command.
Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
---
Documentation/git-svn.txt | 5 +++++
git-svn.perl | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 636e09048e..b858374649 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -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
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)$/) {
--
2.16.2
next reply other threads:[~2018-03-04 11:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-04 11:22 Andreas Heiduk [this message]
2018-03-04 11:22 ` [PATCH 2/2] git-svn: allow empty email-address in authors-prog and authors-file Andreas Heiduk
2018-03-05 1:42 ` Eric Sunshine
2018-03-05 9:37 ` Andreas Heiduk
2018-03-05 20:20 ` Eric Wong
2018-03-05 22:22 ` Eric Sunshine
2018-03-06 22:24 ` Andreas Heiduk
2018-03-05 0:52 ` [PATCH 1/2] git-svn: search --authors-prog in PATH too Eric Sunshine
2018-03-05 17:52 ` Eric Wong
2018-03-05 19:48 ` Andreas Heiduk
2018-03-05 20:16 ` Andreas Heiduk
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=20180304112237.19254-1-asheiduk@gmail.com \
--to=asheiduk@gmail.com \
--cc=e@80x24.org \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.