From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgwEU-0002f4-64 for qemu-devel@nongnu.org; Wed, 22 Oct 2014 09:45:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgwEN-00075v-3A for qemu-devel@nongnu.org; Wed, 22 Oct 2014 09:45:45 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:35302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgwEM-00075Y-GK for qemu-devel@nongnu.org; Wed, 22 Oct 2014 09:45:38 -0400 Received: by mail-wi0-f182.google.com with SMTP id bs8so1411508wib.9 for ; Wed, 22 Oct 2014 06:45:37 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5447B4FC.2010909@redhat.com> Date: Wed, 22 Oct 2014 15:45:32 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1413974493-2685-1-git-send-email-pbonzini@redhat.com> <8761fcclf8.fsf@blackfin.pond.sub.org> In-Reply-To: <8761fcclf8.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2 4/4] get_maintainer.pl: restrict cases where it falls back to --git List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, mst@redhat.com On 10/22/2014 02:56 PM, Markus Armbruster wrote: > Paolo Bonzini writes: > >> The list emitted by --git-fallback often leads inexperienced contributors >> to add pointless CCs. While not discouraging usage of --git-fallback, >> we want to: >> >> 1) disable the fallback if only some files lack a maintainer >> >> $ scripts/get_maintainer.pl -f util/cutils.c hw/ide/core.c >> Kevin Wolf (odd fixer:IDE) >> Stefan Hajnoczi (odd fixer:IDE) >> >> This behavior is taken even if --git-fallback is specified. >> >> 2) warn the contributors about what we're doing, asking them to use their >> common sense: >> >> $ scripts/get_maintainer.pl -f util/cutils.c >> get_maintainer.pl: No maintainers found, printing recent contributors. >> get_maintainer.pl: Do not blindly cc: them on patches! Use common sense. >> >> Luiz Capitulino (commit_signer:1/2=50%) >> ... >> $ >> >> Explicitly disabling the fallback will not result in the warning message: >> >> $ scripts/get_maintainer.pl -f util/cutils.c --no-git-fallback >> $ echo $? >> 1 >> >> Signed-off-by: Paolo Bonzini >> --- >> scripts/get_maintainer.pl | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl >> index 7c6d186..f4fee27 100755 >> --- a/scripts/get_maintainer.pl >> +++ b/scripts/get_maintainer.pl >> @@ -633,6 +633,15 @@ sub get_maintainers { >> } >> >> if ($email) { >> + if (! $interactive) { >> + $email_git_fallback = 0 if @email_to > 0 || @list_to > 0 || $email_git || $email_git_blame; >> + if ($email_git_fallback) { >> + print STDERR "get_maintainer.pl: No maintainers found, printing recent contributors.\n"; >> + print STDERR "get_maintainer.pl: Do not blindly cc: them on patches! Use common sense.\n"; >> + print STDERR "\n"; >> + } >> + } >> + >> foreach my $file (@files) { >> if ($email_git || ($email_git_fallback && >> !$exact_pattern_match_hash{$file})) { > > I liked v1 better. Me too, but we can start with this. It's better than the status quo, and the difference overall is small (the important part is disabling fallback---with no message---on @email_to || @list_to). Paolo