Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5144696pxv; Tue, 6 Jul 2021 19:04:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeUYU0sV1Xk/0WFD7KlN+DBjlCIHzrmws/hoeO2P8OBsiIc+ayK5TTP7aRARs/poES4ft+ X-Received: by 2002:a05:6e02:1a04:: with SMTP id s4mr16151953ild.294.1625623467397; Tue, 06 Jul 2021 19:04:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625623467; cv=none; d=google.com; s=arc-20160816; b=neVK+yKPEAXMAp7iYFKeD5jAODFPTn4NBPWmq4vh3qML559DO6PSwXG767ixyWm3U6 kSNC+AenKLrzpmPFTx5v6fIYQIM0ZH3jpl/eemrOQTfhLuTbGYerZenD4f7ImwfLpEOs 3VXKEfohzJ6em/pAFpU2hLMvEbC/RDfSOs7yP5O4b8aVhT10R5QucbwhO+bQYmdNhqKR RBQChCwvYyrV7otNDEehlKFDKPXSFlw4fegkSSw20lM2wKMHVUPQVjPLeVgglmnb9de5 E9gO0v3HGwVwuDIxXgqI/OTL61fu7ioZpNa4i4rOib4ntx1jPaiX8W3pCQ39qdKYX1bV uDXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=Y0CCw0DB8WwCKJVAgMcf/hxkVi/u0xCZKKbwUhUQNBM=; b=aYUwlLjJR5NxJxqhlxZU4wP9ANydrwl2C++o4IhBAWc0eeZw+51VOUcRvIh4tOEVlx stkdzxDSu6usSBXKBQ3ceYzRrEJYj8e4L0h/3VipPQ9S8FGHwMlMnHFBDx6tRa7tZiK+ WzwkerLuB21lKpdBcE5eLrNt+gJMWQkQyc9LmuzNX6AOeANUBkUthorRkoT96Dsnm5sV 0XvTG2Sxfh4NSe9IJBsSsOgTX1hIciib1od2ixbBfQPcIW6UqWXzK1XdBipjpUVoaBvX gUmL1oEji6DgMK4NKcxNunAa1+vhcvs3kK1z8sWoklLHFvL+2CiezonJtyf6jdaf6a+g uDxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si20001264iol.103.2021.07.06.19.04.15; Tue, 06 Jul 2021 19:04:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229993AbhGGCG2 (ORCPT + 99 others); Tue, 6 Jul 2021 22:06:28 -0400 Received: from smtprelay0165.hostedemail.com ([216.40.44.165]:56482 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229949AbhGGCG2 (ORCPT ); Tue, 6 Jul 2021 22:06:28 -0400 Received: from omf04.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id D7924837F24F; Wed, 7 Jul 2021 02:03:47 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf04.hostedemail.com (Postfix) with ESMTPA id A57C5D1519; Wed, 7 Jul 2021 02:03:46 +0000 (UTC) Message-ID: Subject: Re: [PATCH] checkpatch: Don't show signatures in git-log From: Joe Perches To: Palmer Dabbelt , linux-kernel@vger.kernel.org Cc: apw@canonical.com, dwaipayanray1@gmail.com, lukas.bulwahn@gmail.com, kernel-team@android.com, Palmer Dabbelt Date: Tue, 06 Jul 2021 19:03:45 -0700 In-Reply-To: <20210706223029.2377293-1-palmer@dabbelt.com> References: <20210706223029.2377293-1-palmer@dabbelt.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.40 X-Rspamd-Server: rspamout01 X-Rspamd-Queue-Id: A57C5D1519 X-Stat-Signature: r5wzhgqp5fjt4pef8sxim16xw8f8sasj X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1/E9W/apzvJshL5TtOqRHykwe+qdVhVILA= X-HE-Tag: 1625623426-211901 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-07-06 at 15:30 -0700, Palmer Dabbelt wrote: > From: Palmer Dabbelt > > I have git-log setup to show signatures. I've recently noticed this > breaking checkpatch error messages, which show something like > > ????ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 'commit gpg: Signatu (":05 PM PDT")' > ????#8: > ????the module region by 3a02764c372c ("riscv: Ensure BPF_JIT_REGION_START > > instead of something more helpful, like > > ????ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 3a02764c372c ("riscv: Ensure BPF_JIT_REGION_START aligned with PMD size")' > ????#8: > ????the module region by 3a02764c372c ("riscv: Ensure BPF_JIT_REGION_START > > which shows up with this patch. I'm not sure if these just started > showing up for if I just noticed them or if they've been around forever. > > I've only found it necessary to add --no-show-signature to the git-log > invocation in git_commit_info(), but a cursory glance indicates that the > other two invocations may suffer from similar problems so I've just > added it everywhere. Perhaps this should be in some standardized $git_log_options argument so that if there are more of these no-<foo> that need to be added, like for instance, --no-notes, it'd be easier to add everywhere. > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -1103,7 +1103,7 @@ sub seed_camelcase_includes { > ? $camelcase_seeded = 1; somwhere above: our $git_log_no_opts = '--no-show-signature --no-color" > > ? if (-e "$gitroot") { > - my $git_last_include_commit = `${git_command} log --no-merges --pretty=format:"%h%n" -1 -- include`; > + my $git_last_include_commit = `${git_command} log --no-show-signature --no-merges --pretty=format:"%h%n" -1 -- include`; So this could be: my $git_last_include_commit = `${git_command} log $git_log_no_opts --no-merges --pretty=format:"%h%n" -1 -- include`; > ? chomp $git_last_include_commit; > ? $camelcase_cache = ".checkpatch-camelcase.git.$git_last_include_commit"; > ? } else { > @@ -1165,7 +1165,7 @@ sub git_commit_info { > ? > ? return ($id, $desc) if ((which("git") eq "") || !(-e "$gitroot")); > ? > > - my $output = `${git_command} log --no-color --format='%H %s' -1 $commit 2>&1`; > + my $output = `${git_command} log --no-color --no-show-signature --format='%H %s' -1 $commit 2>&1`; my $output = `${git_command} log $git_log_no_opts --format='%H %s' -1 $commit 2>&1`; etc... > ? $output =~ s/^\s*//gm; > ? my @lines = split("\n", $output); > > @@ -1215,7 +1215,7 @@ if ($git) { > ? } else { > ? $git_range = "-1 $commit_expr"; > ? } > - my $lines = `${git_command} log --no-color --no-merges --pretty=format:'%H %s' $git_range`; > + my $lines = `${git_command} log --no-show-signature --no-color --no-merges --pretty=format:'%H %s' $git_range`; my $lines = `${git_command} log $git_log_no_opts --no-merges --pretty=format:'%H %s' $git_range`; > ? foreach my $line (split(/\n/, $lines)) { > ? $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/; > ? next if (!defined($1) || !defined($2));