Gerrit Error: commit subject >65 characters; use shorter first paragraph

匿名 (未验证) 提交于 2019-12-03 09:02:45

问题:

We started to use the Gerrit code review recently. Sometimes when you make a simple commit and try to make a push to Gerrit, this error is displayed:

   remote rejected    commit subject >65 characters; use shorter first paragraph 

I looked in the web but did not find how to solve this problem. I tried to make an amend in the previous commit and reduce the size of the commit message, but the error remains.

What kind of error is that? And how to solve it? Is there some Gerrit configuration about the size of the commit message?

回答1:

The first paragraph of your commit message should be 65 characters.

You may split it for a longer text:

initial commit message <65 chars  my long commit message with a lot of information, Lorem ipsum dolor sit amet, consectetur adipiscing elit.  Suspendisse metus nulla, blandit eget aliquam sed, tincidunt nec turpis. Ut quis gravida augue, scelerisque tempor risus... 


回答2:

Check if you have installed commit-message-length-validator plugin. By default, commit message max subject length is 65, max line length is 70.

You could change the default setting on gerrit.config or you could remove/disable this plugin.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!