linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] get_maintainer: Allow usage outside of kernel tree
@ 2018-06-26 10:07 Antonio Nino Diaz
  2018-07-26 22:39 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Antonio Nino Diaz @ 2018-06-26 10:07 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel

Add option '--no-tree' to get_maintainer.pl script to allow using this
script in projects that aren't the Linux kernel if they use the same
format for their MAINTAINERS file. This command is also available in
checkpatch.pl, for example.

Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
---
 scripts/get_maintainer.pl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index c87fa73..82a482f 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -48,6 +48,7 @@ my $output_roles = 0;
 my $output_rolestats = 1;
 my $output_section_maxlen = 50;
 my $scm = 0;
+my $tree = 1;
 my $web = 0;
 my $subsystem = 0;
 my $status = 0;
@@ -255,6 +256,7 @@ if (!GetOptions(
                'subsystem!' => \$subsystem,
                'status!' => \$status,
                'scm!' => \$scm,
+               'tree!' => \$tree,
                'web!' => \$web,
                'letters=s' => \$letters,
                'pattern-depth=i' => \$pattern_depth,
@@ -319,7 +321,7 @@ if ($email &&
     die "$P: Please select at least 1 email option\n";
 }

-if (!top_of_kernel_tree($lk_path)) {
+if ($tree && !top_of_kernel_tree($lk_path)) {
     die "$P: The current directory does not appear to be "
        . "a linux kernel source tree.\n";
 }
@@ -1031,13 +1033,14 @@ Other options:
   --sections => print all of the subsystem sections with pattern matches
   --letters => print all matching 'letter' types from all matching sections
   --mailmap => use .mailmap file (default: $email_use_mailmap)
+  --no-tree => run without a kernel tree
   --self-test => show potential issues with MAINTAINERS file content
   --version => show version
   --help => show this help information

 Default options:
-  [--email --nogit --git-fallback --m --r --n --l --multiline --pattern-depth=0
-   --remove-duplicates --rolestats]
+  [--email --tree --nogit --git-fallback --m --r --n --l --multiline
+   --pattern-depth=0 --remove-duplicates --rolestats]

 Notes:
   Using "-f directory" may give unexpected results:
--
2.7.4

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] get_maintainer: Allow usage outside of kernel tree
  2018-06-26 10:07 [PATCH] get_maintainer: Allow usage outside of kernel tree Antonio Nino Diaz
@ 2018-07-26 22:39 ` Andrew Morton
  2018-07-27  0:56   ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2018-07-26 22:39 UTC (permalink / raw)
  To: Antonio Nino Diaz; +Cc: Joe Perches, linux-kernel

On Tue, 26 Jun 2018 11:07:03 +0100 Antonio Nino Diaz <antonio.ninodiaz@arm.com> wrote:

> Add option '--no-tree' to get_maintainer.pl script to allow using this
> script in projects that aren't the Linux kernel if they use the same
> format for their MAINTAINERS file. This command is also available in
> checkpatch.pl, for example.
> 

Seems OK to me?

Please note that your email client is converting tabs to spaces.

> --- a/scripts/get_maintainer.pl
> +++ b/scripts/get_maintainer.pl
> @@ -48,6 +48,7 @@ my $output_roles = 0;
>  my $output_rolestats = 1;
>  my $output_section_maxlen = 50;
>  my $scm = 0;
> +my $tree = 1;
>  my $web = 0;
>  my $subsystem = 0;
>  my $status = 0;
> @@ -255,6 +256,7 @@ if (!GetOptions(
>                 'subsystem!' => \$subsystem,
>                 'status!' => \$status,
>                 'scm!' => \$scm,
> +               'tree!' => \$tree,
>                 'web!' => \$web,
>                 'letters=s' => \$letters,
>                 'pattern-depth=i' => \$pattern_depth,
> @@ -319,7 +321,7 @@ if ($email &&
>      die "$P: Please select at least 1 email option\n";
>  }
> 
> -if (!top_of_kernel_tree($lk_path)) {
> +if ($tree && !top_of_kernel_tree($lk_path)) {
>      die "$P: The current directory does not appear to be "
>         . "a linux kernel source tree.\n";
>  }
> @@ -1031,13 +1033,14 @@ Other options:
>    --sections => print all of the subsystem sections with pattern matches
>    --letters => print all matching 'letter' types from all matching sections
>    --mailmap => use .mailmap file (default: $email_use_mailmap)
> +  --no-tree => run without a kernel tree
>    --self-test => show potential issues with MAINTAINERS file content
>    --version => show version
>    --help => show this help information
> 
>  Default options:
> -  [--email --nogit --git-fallback --m --r --n --l --multiline --pattern-depth=0
> -   --remove-duplicates --rolestats]
> +  [--email --tree --nogit --git-fallback --m --r --n --l --multiline
> +   --pattern-depth=0 --remove-duplicates --rolestats]
> 
>  Notes:
>    Using "-f directory" may give unexpected results:



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] get_maintainer: Allow usage outside of kernel tree
  2018-07-26 22:39 ` Andrew Morton
@ 2018-07-27  0:56   ` Joe Perches
  2018-07-30 12:20     ` Antonio Nino Diaz
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2018-07-27  0:56 UTC (permalink / raw)
  To: Andrew Morton, Antonio Nino Diaz; +Cc: linux-kernel

On Thu, 2018-07-26 at 15:39 -0700, Andrew Morton wrote:
> On Tue, 26 Jun 2018 11:07:03 +0100 Antonio Nino Diaz <antonio.ninodiaz@arm.com> wrote:
> 
> > Add option '--no-tree' to get_maintainer.pl script to allow using this
> > script in projects that aren't the Linux kernel if they use the same
> > format for their MAINTAINERS file. This command is also available in
> > checkpatch.pl, for example.
> > 
> 
> Seems OK to me?

Me too. (modulo the spaces)

> Please note that your email client is converting tabs to spaces.
> 
> > --- a/scripts/get_maintainer.pl
> > +++ b/scripts/get_maintainer.pl
> > @@ -48,6 +48,7 @@ my $output_roles = 0;
> >  my $output_rolestats = 1;
> >  my $output_section_maxlen = 50;
> >  my $scm = 0;
> > +my $tree = 1;
> >  my $web = 0;
> >  my $subsystem = 0;
> >  my $status = 0;
> > @@ -255,6 +256,7 @@ if (!GetOptions(
> >                 'subsystem!' => \$subsystem,
> >                 'status!' => \$status,
> >                 'scm!' => \$scm,
> > +               'tree!' => \$tree,
> >                 'web!' => \$web,
> >                 'letters=s' => \$letters,
> >                 'pattern-depth=i' => \$pattern_depth,
> > @@ -319,7 +321,7 @@ if ($email &&
> >      die "$P: Please select at least 1 email option\n";
> >  }
> > 
> > -if (!top_of_kernel_tree($lk_path)) {
> > +if ($tree && !top_of_kernel_tree($lk_path)) {
> >      die "$P: The current directory does not appear to be "
> >         . "a linux kernel source tree.\n";
> >  }
> > @@ -1031,13 +1033,14 @@ Other options:
> >    --sections => print all of the subsystem sections with pattern matches
> >    --letters => print all matching 'letter' types from all matching sections
> >    --mailmap => use .mailmap file (default: $email_use_mailmap)
> > +  --no-tree => run without a kernel tree
> >    --self-test => show potential issues with MAINTAINERS file content
> >    --version => show version
> >    --help => show this help information
> > 
> >  Default options:
> > -  [--email --nogit --git-fallback --m --r --n --l --multiline --pattern-depth=0
> > -   --remove-duplicates --rolestats]
> > +  [--email --tree --nogit --git-fallback --m --r --n --l --multiline
> > +   --pattern-depth=0 --remove-duplicates --rolestats]
> > 
> >  Notes:
> >    Using "-f directory" may give unexpected results:
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] get_maintainer: Allow usage outside of kernel tree
  2018-07-27  0:56   ` Joe Perches
@ 2018-07-30 12:20     ` Antonio Nino Diaz
  0 siblings, 0 replies; 4+ messages in thread
From: Antonio Nino Diaz @ 2018-07-30 12:20 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton; +Cc: linux-kernel

Thanks for accepting the patch!

And also thanks for warning me about the tabs. The client is not the problem,
I've been told that the change is made by the server. There are some issues with
the default email server that the people that regularly work with the kernel
know, but I didn't until after sending the patch, which is quite annoying...
I'll make sure that this doesn't happen again.

On 07/27/2018 01:56 AM, Joe Perches wrote:
> On Thu, 2018-07-26 at 15:39 -0700, Andrew Morton wrote:
>> On Tue, 26 Jun 2018 11:07:03 +0100 Antonio Nino Diaz <antonio.ninodiaz@arm.com> wrote:
>>
>>> Add option '--no-tree' to get_maintainer.pl script to allow using this
>>> script in projects that aren't the Linux kernel if they use the same
>>> format for their MAINTAINERS file. This command is also available in
>>> checkpatch.pl, for example.
>>>
>>
>> Seems OK to me?
>
> Me too. (modulo the spaces)
>
>> Please note that your email client is converting tabs to spaces.
>>

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-30 12:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 10:07 [PATCH] get_maintainer: Allow usage outside of kernel tree Antonio Nino Diaz
2018-07-26 22:39 ` Andrew Morton
2018-07-27  0:56   ` Joe Perches
2018-07-30 12:20     ` Antonio Nino Diaz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).