Recent git versions support worktrees where .git is not a directory but
a file with a path to the .git repository; however the get_maintainer.pl
script only recognises the .git directory, let's fix it.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
scripts/get_maintainer.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 71415e3c7061..27991eb1cfb4 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -81,7 +81,7 @@ my %VCS_cmds;
my %VCS_cmds_git = (
"execute_cmd" => \&git_execute_cmd,
- "available" => '(which("git") ne "") && (-d ".git")',
+ "available" => '(which("git") ne "") && (-e ".git")',
"find_signers_cmd" =>
"git log --no-color --follow --since=\$email_git_since " .
'--format="GitCommit: %H%n' .
--
2.17.1
On Tue, Nov 12, 2019 at 02:45:32PM +1100, Alexey Kardashevskiy wrote: > Recent git versions support worktrees where .git is not a directory but > a file with a path to the .git repository; however the get_maintainer.pl > script only recognises the .git directory, let's fix it. > > Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> > --- > scripts/get_maintainer.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Tested-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Thanks, Stefano > diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl > index 71415e3c7061..27991eb1cfb4 100755 > --- a/scripts/get_maintainer.pl > +++ b/scripts/get_maintainer.pl > @@ -81,7 +81,7 @@ my %VCS_cmds; > > my %VCS_cmds_git = ( > "execute_cmd" => \&git_execute_cmd, > - "available" => '(which("git") ne "") && (-d ".git")', > + "available" => '(which("git") ne "") && (-e ".git")', > "find_signers_cmd" => > "git log --no-color --follow --since=\$email_git_since " . > '--format="GitCommit: %H%n' . > -- > 2.17.1 > > --
On Tue, 12 Nov 2019 14:45:32 +1100 Alexey Kardashevskiy <aik@ozlabs.ru> wrote: > Recent git versions support worktrees where .git is not a directory but > a file with a path to the .git repository; however the get_maintainer.pl > script only recognises the .git directory, let's fix it. > > Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> > --- Makes sense. The script in the linux kernel tree has this since 2014 BTW :) Reviewed-by: Greg Kurz <groug@kaod.org> > scripts/get_maintainer.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl > index 71415e3c7061..27991eb1cfb4 100755 > --- a/scripts/get_maintainer.pl > +++ b/scripts/get_maintainer.pl > @@ -81,7 +81,7 @@ my %VCS_cmds; > > my %VCS_cmds_git = ( > "execute_cmd" => \&git_execute_cmd, > - "available" => '(which("git") ne "") && (-d ".git")', > + "available" => '(which("git") ne "") && (-e ".git")', > "find_signers_cmd" => > "git log --no-color --follow --since=\$email_git_since " . > '--format="GitCommit: %H%n' .
On 12/11/19 04:45, Alexey Kardashevskiy wrote: > Recent git versions support worktrees where .git is not a directory but > a file with a path to the .git repository; however the get_maintainer.pl > script only recognises the .git directory, let's fix it. > > Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> > --- > scripts/get_maintainer.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl > index 71415e3c7061..27991eb1cfb4 100755 > --- a/scripts/get_maintainer.pl > +++ b/scripts/get_maintainer.pl > @@ -81,7 +81,7 @@ my %VCS_cmds; > > my %VCS_cmds_git = ( > "execute_cmd" => \&git_execute_cmd, > - "available" => '(which("git") ne "") && (-d ".git")', > + "available" => '(which("git") ne "") && (-e ".git")', > "find_signers_cmd" => > "git log --no-color --follow --since=\$email_git_since " . > '--format="GitCommit: %H%n' . > Queued, thanks. Paolo
© 2016 - 2024 Red Hat, Inc.