From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhIXo-0006fq-Fe for qemu-devel@nongnu.org; Thu, 23 Oct 2014 09:35:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhIXh-0007id-Cm for qemu-devel@nongnu.org; Thu, 23 Oct 2014 09:35:12 -0400 Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:61984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhIXg-0007gP-Vl for qemu-devel@nongnu.org; Thu, 23 Oct 2014 09:35:05 -0400 Received: by mail-wi0-f174.google.com with SMTP id q5so760525wiv.1 for ; Thu, 23 Oct 2014 06:35:04 -0700 (PDT) Received: from playground.station (net-37-117-142-149.cust.vodafonedsl.it. [37.117.142.149]) by mx.google.com with ESMTPSA id u8sm5445638wiz.14.2014.10.23.06.35.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Oct 2014 06:35:03 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 23 Oct 2014 15:34:12 +0200 Message-Id: <1414071252-7003-25-git-send-email-pbonzini@redhat.com> In-Reply-To: <1414071252-7003-1-git-send-email-pbonzini@redhat.com> References: <1414071252-7003-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 24/24] get_maintainer.pl: restrict cases where it falls back to --git List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 $? 0 (Returning 1 would break usage of scripts/get_maintainer.pl as a cccmd for git-send-email). Reviewed-by: Markus Armbruster 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 906dcbe..af68c6c 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -652,6 +652,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})) { -- 1.8.3.1