2016-03-30 15:27, Bruce Richardson: > On Wed, Mar 30, 2016 at 09:46:34AM +0800, Yuanhan Liu wrote: > > On Tue, Mar 29, 2016 at 11:29:46PM +0200, Thomas Monjalon wrote: > > > The git messages have three parts: > > > 1/ the headline > > > 2/ the explanations > > > 3/ the footer tags > > > > > > The headline helps to quickly browse an history or catch instantly the > > > purpose of a commit. Making it short with some consistent wording > > > allows to easily parse it or match some patterns. > > > > > > The explanations must give some keys like the reason of the change. > > > Nothing can be automatically checked for this part. > > > > Actually, I think we might be able to do 2 tests here: > > > > - space line between paragraphs. > > > > - lines over 80 chars. > > 75 chars for commit messages, and 50 for commit titles :-)
The 75 chars limit is already checked by checkpatch.pl. But yes we can have our own check in this script. For the title, I think we can accept 60 chars and exceptionnaly more. To see the history of title length: git log --format='%s' | awk '{lens[length($0)]++;} END {for (len in lens) print len, lens[len] }' | sort -g