Re: [PATCH] checkpatch: Add the backport commit format check

From: Joe Perches
Date: Mon Dec 05 2022 - 07:39:39 EST


On Mon, 2022-12-05 at 17:48 +0800, korantwork@xxxxxxxxx wrote:
> From: Xinghui Li <korantli@xxxxxxxxxxx>
>
> The backport commit has been used to be misreported as Error
> by checkpatch.pl like this:
>
> 'ERROR: Please use git commit description style
> 'commit <12+ chars of sha1> ("<title line>")' - ie:......
> commit <sha1> upstream.
>
> total: 1 errors, 0 warnings, 8 lines checked
> '
> So, add the backport commit format check to avoid the above mistake.

nak.

I don't believe this should be an accepted style.

and

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> ERROR("GIT_COMMIT_ID",
> - "Please use git commit description style 'commit <12+ chars of sha1> (\"<title line>\")' - ie: '${init_char}ommit $id (\"$description\")'\n" . $herectx);
> + "Please use git commit description style 'commit <12+ chars of sha1> (\"<title line>\")' - ie: '${init_char}ommit $id (\"$description\")'\nor check the backport commit description format\n" . $herectx);

Output messages are only single line not multiple lines.