Re: [RFC PATCH 1/2] checkpatch: Correctly detect git commit references that span 3 lines

From: Joe Perches
Date: Mon Aug 06 2018 - 01:07:50 EST


On Mon, 2018-08-06 at 13:58 +1000, Andrew Donnellan wrote:
> If a patch contains a commit reference that happens to span 3 lines, e.g.:
>
> ===
> With the optimizations for TLB invalidation from commit 0cef77c7798a
> ("powerpc/64s/radix: flush remote CPUs out of single-threaded
> mm_cpumask"), the scope of a TLBI (global vs. local) can now be
> influenced by the value of the 'copros' counter of the memory context.
> ===
>
> checkpatch will return a GIT_COMMIT_ID error even though the reference
> actually follows the correct format.

The multiple line block code can be difficult to read.

My suggestion is to instead write a subroutine to get the
commit description and compare that against the returned
git commit description.