All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/4] get_maintainer.pl: exit with status 1 if no maintainer found
Date: Wed, 22 Oct 2014 14:09:51 +0200	[thread overview]
Message-ID: <87iojccnlc.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1413968902-24094-2-git-send-email-pbonzini@redhat.com> (Paolo Bonzini's message of "Wed, 22 Oct 2014 11:08:19 +0200")

Paolo Bonzini <pbonzini@redhat.com> writes:

> This can be useful, at the very least, for debugging.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  scripts/get_maintainer.pl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
> index 38334de..a3a16d8 100755
> --- a/scripts/get_maintainer.pl
> +++ b/scripts/get_maintainer.pl
> @@ -55,7 +55,7 @@ my $help = 0;
>  
>  my $vcs_used = 0;
>  
> -my $exit = 0;
> +my $exit = 1;
>  
>  my %commit_author_hash;
>  my %commit_signer_hash;
> @@ -2061,6 +2061,7 @@ sub output {
>  	print(join($output_separator, @parms));
>  	print("\n");
>      }
> +    $exit = 0 if @parms > 0;
>  }
>  
>  my $rfc822re;

Not sure about "if no maintainer found".

Here's how output() gets called:

    if (@maintainers) {
        @maintainers = merge_email(@maintainers);
        output(@maintainers);
    }

    if ($scm) {
        @scm = uniq(@scm);
        output(@scm);
    }

    if ($status) {
        @status = uniq(@status);
        output(@status);
    }

    if ($subsystem) {
        @subsystem = uniq(@subsystem);
        output(@subsystem);
    }

    if ($web) {
        @web = uniq(@web);
        output(@web);
    }

    exit($exit);

Thus, the patch makes the script exit with status 1 when none of the
above output() calls produces output.

Maybe it exits with status 1 when it fails to produce output?  Obvious
ouput elsewhere: printing the version (okay), and a print in
get_maintainers().  Can't tell what the latter does.  Hmm.

  reply	other threads:[~2014-10-22 12:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22  9:08 [Qemu-devel] [PATCH 0/4] small improvements to get_maintainer.pl Paolo Bonzini
2014-10-22  9:08 ` [Qemu-devel] [PATCH 1/4] get_maintainer.pl: exit with status 1 if no maintainer found Paolo Bonzini
2014-10-22 12:09   ` Markus Armbruster [this message]
2014-10-22 12:32     ` Paolo Bonzini
2014-10-22  9:08 ` [Qemu-devel] [PATCH 2/4] get_maintainer.pl: treat all M entries the same Paolo Bonzini
2014-10-22  9:24   ` Michael S. Tsirkin
2014-10-22  9:08 ` [Qemu-devel] [PATCH 3/4] get_maintainer.pl: move git loop under "if ($email) {" Paolo Bonzini
2014-10-22  9:08 ` [Qemu-devel] [PATCH 4/4] get_maintainer.pl: point at --git-fallback instead of enabling it automatically Paolo Bonzini
2014-10-22  9:33   ` Michael S. Tsirkin
2014-10-22  9:56     ` Paolo Bonzini
2014-10-22 10:13       ` Thomas Huth
2014-10-22 10:17       ` Michael S. Tsirkin
2014-10-22 10:30         ` Paolo Bonzini
2014-10-22 12:55           ` Markus Armbruster
2014-10-22 10:17 ` [Qemu-devel] [PATCH 0/4] small improvements to get_maintainer.pl Thomas Huth
2014-10-22 10:28   ` Michael S. Tsirkin
2014-10-22 10:42     ` Paolo Bonzini
2014-10-22 12:57 ` Markus Armbruster

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=87iojccnlc.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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.