[Linux-kernel-mentees] Possible new warning for checkpatch

Peilin Ye yepeilin.cs at gmail.com
Mon Nov 30 15:23:29 UTC 2020


On Mon, Nov 30, 2020 at 08:28:23PM +0530, Dwaipayan Ray wrote:
> Hi Lukas,
> I was having a talk with Peilin and a possible new idea came up.
> It's about lines in the commit message that start with a '#'.
>
> Normally if a patch contains lines starting with '#' in the commit
> message, when they are applied they successfully appear in the
> git log. But if a maintainer for some reason decides to rebase and
> reword the commit message for whatever reason, the # lines are gone.

Thanks for bringing this up Dwaipayan!

Yes, for example, if one included some code examples (e.g. `#define ...`)
in the commit message, then the maintainer applied, and reworded the
commit to add their own Signed-off-by:, then all the # lines are gone.

> Peilin had a look at it and he was able to successfully reproduce this
> fault.
>
> Now would it make sense if a warning for such lines starting with '#' in
> the commit message are emitted by checkpatch itself? I have no idea
> what other developers do, so I could be wrong at this point. But I would
> like your opinion.

I admit it is a beginner's mistake, but I myself learned it in a hard
way (i.e. by having a patch mainline'd then seeing these # lines gone),
so personally I hope this becomes a new feature of checkpatch.

Thank you,
Peilin Ye



More information about the Linux-kernel-mentees mailing list