[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f416e85d21ebd2058c2ea03f721f5ef7476009c2.camel@perches.com>
Date: Wed, 14 Jan 2026 10:20:34 -0800
From: Joe Perches <joe@...ches.com>
To: Andrew Morton <akpm@...ux-foundation.org>, Ian Rogers
<irogers@...gle.com>
Cc: Kuan-Wei Chiu <visitorckw@...il.com>, Dwaipayan Ray
<dwaipayanray1@...il.com>, Lukas Bulwahn <lukas.bulwahn@...il.com>, Stephen
Rothwell <sfr@...b.auug.org.au>, Andy Whitcroft <apw@...onical.com>,
linux-kernel@...r.kernel.org, Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH v1] checkpatch: Warn about sign offs if there's an
accidental patch separator
On Tue, 2026-01-13 at 19:33 -0800, Andrew Morton wrote:
> I was bitten by this recently. Someone's changelog had
>
> ----------- stuff here
>
> and git-quiltimport remove half the changelog and all the metadata.
>
> git is wrong. I say so coz I invented the --- convention.
> submitting-patches.rst says
>
> - A marker line containing simply ``---``.
>
> The astonishingly old https://www.ozlabs.org/~akpm/stuff/tpp.txt says
> "... scripts will treat a ^--- string as ...". I regret not
> explicitly using "^---$".
>
> I'd like checkpatch to emit a warning in this case. If a line starts
> with --- then please let's warn the user that downstream tooling will
> screw this up.
Maybe something like this:
---
scripts/checkpatch.pl | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e0f1d6a6bc636..8dd58710302bc 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3035,6 +3035,14 @@ sub process {
}
}
+# Check for invalid patch separator
+ if ($in_commit_log &&
+ $line =~ /^---.+/) {
+ ERROR("BAD_PATCH_SEPARATOR",
+ "Invalid patch separator - some tools may have problems applying this\n" . $herecurr)
+ }
+
+
# Check for patch separator
if ($line =~ /^---$/) {
$has_patch_separator = 1;
Powered by blists - more mailing lists