All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch: check Signed-off-by: lines for patches coming from stdin
@ 2015-08-11 14:20 Javi Merino
  2015-08-11 16:47 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Javi Merino @ 2015-08-11 14:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javi Merino, Joe Perches, Petr Mladek, Andy Whitcroft,
	Andrew Morton

Commit 34d8815f9512 ("checkpatch: add --showfile to allow input via pipe
to show filenames") disabled the ability to check for Signed-off-by
lines in patches that are fed to scripts/checkpatch.pl from stdin.  This
makes things like:

git rebase --interactive --exec 'git format-patch --stdout -1 | scripts/checkpatch.pl --strict -'

not complain about patches without a Signed-off-by.

While commit 34d8815f9512 ("checkpatch: add --showfile to allow input
via pipe to show filenames") is meant to work with the output of git
diff, this should be achieved by explicitly passing --no-signoff
to checkpatch.pl:

git diff | ./scripts/checkpatch --no-signoff -

Fixes: 34d8815f9512 ("checkpatch: add --showfile to allow input via pipe to show filenames")
Cc: Joe Perches <joe@perches.com>
Cc: Petr Mladek <pmladek@suse.cz>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Javi Merino <javi.merino@arm.com>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d5c8e9a3a73c..984e7ddfd7e3 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5684,7 +5684,7 @@ sub process {
 		ERROR("NOT_UNIFIED_DIFF",
 		      "Does not appear to be a unified-diff format patch\n");
 	}
-	if ($is_patch && $filename ne '-' && $chk_signoff && $signoff == 0) {
+	if ($is_patch && $chk_signoff && $signoff == 0) {
 		ERROR("MISSING_SIGN_OFF",
 		      "Missing Signed-off-by: line(s)\n");
 	}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-11 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 14:20 [PATCH] checkpatch: check Signed-off-by: lines for patches coming from stdin Javi Merino
2015-08-11 16:47 ` Joe Perches
2015-08-11 17:04   ` Javi Merino

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.