From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: apw@canonical.com
Cc: akpm@linux-foundation.org, joe@perches.com,
linux-kernel@vger.kernel.org,
Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: [PATCH] checkpatch: do not try to sanity test cover letters
Date: Mon, 27 Feb 2012 19:29:36 -0500 [thread overview]
Message-ID: <1330388976-30633-1-git-send-email-paul.gortmaker@windriver.com> (raw)
One possibly common workflow is this:
git format-patch -o mypatches --cover-letter ^start end
./scripts/checkpatch.pl mypatches/*
The problem with the above is that checkpatch.pl will try to
parse the cover-letter, and of course complain that it can not
find any unified diff within.
It is pretty safe for us to assume "0000-cover-letter.patch" is
not in fact a patch and simply skip processing of it.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
[what I know about perl could be written on the back of a postage
stamp in crayon, so please feel free to reimplement the overall
concept of this change as you see fit.... ]
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a3b9782..fc22f4b 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6,6 +6,7 @@
# Licensed under the terms of the GNU GPL License version 2
use strict;
+use File::Basename;
my $P = $0;
$P =~ s@.*/@@g;
@@ -382,6 +383,10 @@ for my $filename (@ARGV) {
open($FILE, '<', "$filename") ||
die "$P: $filename: open failed - $!\n";
}
+ if (basename($filename) eq '0000-cover-letter.patch') {
+ print "Skipping cover letter $filename\n";
+ next;
+ }
if ($filename eq '-') {
$vname = 'Your patch';
} else {
--
1.7.9.1
next reply other threads:[~2012-02-28 0:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 0:29 Paul Gortmaker [this message]
2012-02-28 0:36 ` [PATCH] checkpatch: do not try to sanity test cover letters Joe Perches
2012-02-28 0:47 ` Paul Gortmaker
2012-02-28 0:50 ` Joe Perches
2012-02-28 15:38 ` Andy Whitcroft
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=1330388976-30633-1-git-send-email-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.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.