]> www.infradead.org Git - users/jedix/linux-maple.git/commit
checkpatch: improve GIT_COMMIT_ID test
authorJoe Perches <joe@perches.com>
Mon, 23 Aug 2021 23:59:59 +0000 (09:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:34:53 +0000 (09:34 +1000)
commit9b6d0f30bd1284425aab0de00138e21cb939eaf0
treecdae88407de5efdcfb38e8f2560be8fa271c93b2
parent6d01cb2324d0cf1272062cf0d08cc8cd34e968d0
checkpatch: improve GIT_COMMIT_ID test

The preferred git commit id reference has the form

commit <SHA-1> ("Title line")

where SHA-1 is the commit hex hash with a minimum lenth of 12 and ("Title
line") is the complete title line of the commit with a (" prefix and ")
suffix.

The current tests fail when the "Title line" has one or more embedded
double quotes.

Improve the test that finds the commit SHA-1 hex hash then ("Title line")
by using $balanced_parens for a maximum of 3 consecutive lines.

Link: https://lkml.kernel.org/r/976c6cdd680db4b55ae31b5fc2d1779da5c0dc66.camel@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Denis Efremov <efremov@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
scripts/checkpatch.pl