lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1330388976-30633-1-git-send-email-paul.gortmaker@windriver.com>
Date:	Mon, 27 Feb 2012 19:29:36 -0500
From:	Paul Gortmaker <paul.gortmaker@...driver.com>
To:	apw@...onical.com
Cc:	akpm@...ux-foundation.org, joe@...ches.com,
	linux-kernel@...r.kernel.org,
	Paul Gortmaker <paul.gortmaker@...driver.com>
Subject: [PATCH] checkpatch: do not try to sanity test cover letters

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@...driver.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ