Re: [PATCH 1/2] git-svn: search --authors-prog in PATH too
Am 05.03.2018 um 20:48 schrieb Andreas Heiduk: > Am 05.03.2018 um 18:52 schrieb Eric Wong: >> Thanks both, I've queued 1/2 up with Eric S's edits at svn/authors-prog. >> I'm not yet convinced 2/2 is a good change, however. > > I'm not sure which direction your argument points to: Do you object to a > $PATH search at all? Or would you like to remove the legacy code too? > Or is the code/doc/... in bad shape? OK, I've mismatched your reply and the patch number. So my new questions are: Do you object to the feature as such? Or would you like to remove the legacy code too? Or is the code/doc/... in bad shape beyond what E.S. already mentioned? Right now my team performs a hefty "git filter-branch" after each "git svn fetch" followed by black magic to set the new object ids in the caches / rev-maps of git-svn. Official support for "no synthetic email" would be much easier.
Re: [PATCH 1/2] git-svn: search --authors-prog in PATH too
Am 05.03.2018 um 18:52 schrieb Eric Wong: > > Thanks both, I've queued 1/2 up with Eric S's edits at svn/authors-prog. > I'm not yet convinced 2/2 is a good change, however. I'm not sure which direction your argument points to: Do you object to a $PATH search at all? Or would you like to remove the legacy code too? Or is the code/doc/... in bad shape?
Re: [PATCH 1/2] git-svn: search --authors-prog in PATH too
Eric Sunshinewrote: > On Sun, Mar 4, 2018 at 6:22 AM, Andreas Heiduk wrote: > > 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 > > s/directoy/directory/ > > > 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. > > s/search/searched for/ > > > Signed-off-by: Andreas Heiduk Thanks both, I've queued 1/2 up with Eric S's edits at svn/authors-prog. I'm not yet convinced 2/2 is a good change, however. The following changes since commit 7e31236f652ad9db221511eaf157ce0ef55585d6: Sixth batch for 2.17 (2018-02-28 13:39:24 -0800) are available in the Git repository at: git://bogomips.org/git-svn.git svn/authors-prog for you to fetch changes up to e99652c412701cf988770e5cfaa253712a39221a: git-svn: search --authors-prog in PATH too (2018-03-05 02:09:57 +) Andreas Heiduk (1): git-svn: search --authors-prog in PATH too Documentation/git-svn.txt | 5 + git-svn.perl | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-)
Re: [PATCH 1/2] git-svn: search --authors-prog in PATH too
On Sun, Mar 4, 2018 at 6:22 AM, Andreas Heidukwrote: > 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 s/directoy/directory/ > 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. s/search/searched for/ > Signed-off-by: Andreas Heiduk
[PATCH 1/2] 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 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--- 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 ", 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