mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
	 Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Saravana Kannan <saravanak@google.com>,
	kernel-team@android.com,  linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] checkpatch: Don't check for unified diff format in git sendemail headers
Date: Wed, 21 Feb 2024 21:15:40 -0800	[thread overview]
Message-ID: <20240222051539.3001988-4-saravanak@google.com> (raw)
In-Reply-To: <20240222051539.3001988-3-saravanak@google.com>

When checkpatch is used as a git sendemail-validate hook, it's also passed
in the email header for sanity check. These headers are, as expected, not
in unified diff format. So, don't complain about unified diff format for
these header files.

Signed-off-by: Saravana Kannan <saravanak@google.com>
---
 scripts/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f306634a938c..4312166ca828 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -7689,7 +7689,8 @@ sub process {
 		exit(0);
 	}
 
-	if (!$is_patch && $filename !~ /cover-letter\.patch$/) {
+	if (!$is_patch && $filename !~ /cover-letter\.patch$/ &&
+	    $filename !~ /\.git\/\.gitsendemail\.header\.\w+$/) {
 		ERROR("NOT_UNIFIED_DIFF",
 		      "Does not appear to be a unified-diff format patch\n");
 	}
-- 
2.44.0.rc0.258.g7320e95886-goog


  reply	other threads:[~2024-02-22  5:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22  5:15 [PATCH 1/2] checkpatch: Don't check for 75 chars per line for create/delete mode lines Saravana Kannan
2024-02-22  5:15 ` Saravana Kannan [this message]
2024-02-22  8:54   ` [PATCH 2/2] checkpatch: Don't check for unified diff format in git sendemail headers Joe Perches
2024-02-23  0:45     ` Saravana Kannan
2024-02-23  1:01       ` Joe Perches
2024-02-23  1:10         ` Saravana Kannan
2024-02-23  1:22           ` Joe Perches
2024-02-23 19:05           ` Lukas Bulwahn
2024-04-12  4:33 ` [PATCH 1/2] checkpatch: Don't check for 75 chars per line for create/delete mode lines Saravana Kannan

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=20240222051539.3001988-4-saravanak@google.com \
    --to=saravanak@google.com \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®