Hi,

As a committer I’d say it should be enforced. Committers have tons of other 
work to do that cannot be automated.

On the other hand, the problem with revert Alexis has pointed out must be 
solved. Probably by automatically trimming the original header, so that 
together with the word “revert: “ it’s no more than 50 characters long. This 
way the message will still contain enough info to understand which commit was 
reverted.

There doesn’t seem to be a suitable hook<https://git-scm.com/docs/githooks> for 
that, but probably the commit hook can be modified to check if a commit message 
starts with “revert: “.

Best regards,
Vitaliy

From: [email protected] 
[mailto:[email protected]] On Behalf Of Alexis de Talhouët
Sent: Tuesday, November 28, 2017 18:42
To: Morales, Victor <[email protected]>
Cc: Mike Evans via onap-discuss <[email protected]>; 
[email protected]
Subject: Re: [onap-discuss] [onap-tsc] [Gerrit] Commit message restriction

Hi Victor,

I agree, this can be set locally, and can be enforced by the committers of a 
given project.
What I’m trying to gage here is whether people rather like having this 
enforced, or if we could loosen those rules, and let committers have this 
responsibilities.

Regards,
Alexis


On Nov 28, 2017, at 11:37 AM, Morales, Victor 
<[email protected]<mailto:[email protected]>> wrote:

Hey Alexis,

I never tough about these points that you mentioned. Personally, I found it 
good habit but I came from OpenStack world where they share some rules[1]. By 
other hand, I think that you can setup vim to automatically split the commit 
messages. I’d prefer to do emphasis in the content on the message rather than 
the rules, that could facilitate reviewing process.

Regards,
Victor Morales

[1] https://wiki.openstack.org/wiki/GitCommitMessages

From: <[email protected]<mailto:[email protected]>> 
on behalf of Alexis de Talhouët 
<[email protected]<mailto:[email protected]>>
Date: Monday, November 27, 2017 at 12:13 PM
To: Mike Evans via onap-discuss 
<[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [onap-tsc] [Gerrit] Commit message restriction

Hi ONAP devs, committers, PTLs,

I want to start a thread wrt the commit message restriction; bellow my 
observations:

- reverting a patch through gerrit UI often fails with 500 ERROR due to: commit 
subject >50 characters; use shorter first paragraph
If we think about it, someone creates a patch with 50 characters as commit 
title, then someone wants to revert, it automatically force the user to revert 
using CLI because the reverts add “revert: “, which adds 9 characters, hence 
validation fails. This is somewhat annoying.

- pasting a stacktrace as a commit message is kind of prohibited: too many 
commit message lines longer than 72 characters; manually wrap lines

I understand as a community we want to foster developers to use common 
practices, but should we really enforced those?
I worked in a couple of other communities that has a large pool of contributors 
and everything is working fine, without those mentioned two rules enforced.

I tend to think it’s the commiter role to enforce best practices on commit msg 
within his project, it shouldn’t be enforced by the system itself.

So I’d like to know devs/committers/PTLs feeling about this, and also ask the 
TSC whether this is sealed in rock or not.

Thanks,
Alexis

This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>
_______________________________________________
ONAP-TSC mailing list
[email protected]
https://lists.onap.org/mailman/listinfo/onap-tsc

Reply via email to