You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by Joern Kottmann <ko...@gmail.com> on 2017/01/09 13:26:44 UTC

Commit message style

Hello all,

we are using different styles for commit messages. It would be good to have
a short discussion on how we think they should be and agree all on how to
write the subject line.

Here are few points from me:
- Good commit messages are important to understand what happened in the
project and motivate to produce well thought through commits
- In git we have a subject line, first line in the commit message, should
be around 50 chars, GH cuts after 72 chars and knows this convention
- Subject line is usually written in imperative (git convention)
- Capitalize the first word (like in a new sentence)
- Commit message should contain the issue symbol

Open questions:
- Should the issue symbol be in the subject line? Or in the body?
- Everyone fine with writing subject line in imperative?

Here is an interesting article about it:
http://chris.beams.io/posts/git-commit/

Jörn

Re: Commit message style

Posted by ARUN Thundyill Saseendran <at...@gmail.com>.
True a template for PRs will be very helpful.

Also a shared validation trigger for commit messages will help reduce manual effort in verifying commit messages.

Also mandating JIRA Issue keys in commit messages will help us easily correlate a feature, requirement, bug etc., with the associated code commits.

Thanks
Arun

> On 11-Jan-2017, at 2:51 AM, Suneel Marthi <su...@gmail.com> wrote:
> 
> Other projects like flink, spark etc... have a template u would need to
> fill out before a PR can be made. This is a github based template which we
> could create one for OpenNLP too.
> 
> 
> 
>> On Tue, Jan 10, 2017 at 4:19 PM, Joern Kottmann <ko...@gmail.com> wrote:
>> 
>> Should we have a shared hook script that can be used for commit message
>> validation?
>> 
>> Are there other things we would like to do with that?
>> 
>> Currently we can easily catch bad commit messages during review,
>> commits usually get squashed into one to not have all the feedback
>> commits in our history.
>> 
>> Jörn
>> 
>>> On Wed, 2017-01-11 at 02:14 +0530, ARUN Thundyill Saseendran wrote:
>>> +1
>>> 
>>> Just to confirm,
>>> 
>>> *OPENNLP-xxx[,OPENNLP-yyy,...] : Commit Message*
>>> 
>>> Also will there be a pre-commit trigger in git to validate this.
>>> 
>>> Thanks
>>> Arun
>>> 
>>> On Wed, Jan 11, 2017 at 2:08 AM, Tommaso Teofili <tommaso.teofili@gma
>>> il.com>
>>> wrote:
>>> 
>>>> +1
>>>> 
>>>> Tommaso
>>>> 
>>>> Il giorno mar 10 gen 2017 alle ore 11:20 Rodrigo Agerri <
>>>> ragerri@apache.org>
>>>> ha scritto:
>>>> 
>>>>> +1 for the OPENNLP-xxx: commit message.
>>>>> 
>>>>> 
>>>>> 
>>>>> On Tue, Jan 10, 2017 at 12:51 AM, William Colen <william.colen@gm
>>>>> ail.com
>>>>> 
>>>>> wrote:
>>>>> 
>>>>>> +1 for the OPENNLP-xxx: commit message.
>>>>>> Fast to find a commit.
>>>>>> 
>>>>>> 
>>>>>> 2017-01-09 21:24 GMT-02:00 Joern Kottmann <ko...@gmail.com>:
>>>>>> 
>>>>>>> On Mon, 2017-01-09 at 17:02 -0500 <02%200500>, Jeffrey
>>>>>>> Zemerick
>>>> 
>>>> wrote:
>>>>>>>> I'm personally a fan of the issue number being the first
>>>>>>>> thing on
>>>> 
>>>> the
>>>>>>>> subject line, like "OPENNLP-xxx: commit message." For me it
>>>>>>>> gives a
>>>>>>>> consistent place to look for the issue without having to
>>>>>>>> read the
>>>>>>>> full
>>>>>>>> message. (That way you can also see the issue number in
>>>>>>>> GitHub's
>>>>>>>> commit
>>>>>>>> list without having to expand the commit.)
>>>>>>> 
>>>>>>> 
>>>>>>> Yes, it is also faster to write like that, on the other hand
>>>>>>> if the
>>>>>>> subject line is then too short to write something meaningful
>>>>>>> it is
>>>>>>> probably better to write it in the body instead.
>>>>>>> 
>>>>>>> +1 to write it first thing in the subject line in all cases
>>>>>>> where it
>>>> 
>>>> is
>>>>>>> possible, for very rare cases where it doesn't work it can
>>>>>>> still be
>>>> 
>>>> in
>>>>>>> the body
>>>>>>> 
>>>>>>> Jörn
>>>>>>> 
>>> 
>>> 
>>> 
>>> --
>> 

Re: Commit message style

Posted by Suneel Marthi <su...@gmail.com>.
Other projects like flink, spark etc... have a template u would need to
fill out before a PR can be made. This is a github based template which we
could create one for OpenNLP too.



On Tue, Jan 10, 2017 at 4:19 PM, Joern Kottmann <ko...@gmail.com> wrote:

> Should we have a shared hook script that can be used for commit message
>  validation?
>
> Are there other things we would like to do with that?
>
> Currently we can easily catch bad commit messages during review,
> commits usually get squashed into one to not have all the feedback
> commits in our history.
>
> Jörn
>
> On Wed, 2017-01-11 at 02:14 +0530, ARUN Thundyill Saseendran wrote:
> > +1
> >
> > Just to confirm,
> >
> > *OPENNLP-xxx[,OPENNLP-yyy,...] : Commit Message*
> >
> > Also will there be a pre-commit trigger in git to validate this.
> >
> > Thanks
> > Arun
> >
> > On Wed, Jan 11, 2017 at 2:08 AM, Tommaso Teofili <tommaso.teofili@gma
> > il.com>
> > wrote:
> >
> > > +1
> > >
> > > Tommaso
> > >
> > > Il giorno mar 10 gen 2017 alle ore 11:20 Rodrigo Agerri <
> > > ragerri@apache.org>
> > > ha scritto:
> > >
> > > > +1 for the OPENNLP-xxx: commit message.
> > > >
> > > >
> > > >
> > > > On Tue, Jan 10, 2017 at 12:51 AM, William Colen <william.colen@gm
> > > > ail.com
> > > >
> > > > wrote:
> > > >
> > > > > +1 for the OPENNLP-xxx: commit message.
> > > > > Fast to find a commit.
> > > > >
> > > > >
> > > > > 2017-01-09 21:24 GMT-02:00 Joern Kottmann <ko...@gmail.com>:
> > > > >
> > > > > > On Mon, 2017-01-09 at 17:02 -0500 <02%200500>, Jeffrey
> > > > > > Zemerick
> > >
> > > wrote:
> > > > > > > I'm personally a fan of the issue number being the first
> > > > > > > thing on
> > >
> > > the
> > > > > > > subject line, like "OPENNLP-xxx: commit message." For me it
> > > > > > > gives a
> > > > > > > consistent place to look for the issue without having to
> > > > > > > read the
> > > > > > > full
> > > > > > > message. (That way you can also see the issue number in
> > > > > > > GitHub's
> > > > > > > commit
> > > > > > > list without having to expand the commit.)
> > > > > >
> > > > > >
> > > > > > Yes, it is also faster to write like that, on the other hand
> > > > > > if the
> > > > > > subject line is then too short to write something meaningful
> > > > > > it is
> > > > > > probably better to write it in the body instead.
> > > > > >
> > > > > > +1 to write it first thing in the subject line in all cases
> > > > > > where it
> > >
> > > is
> > > > > > possible, for very rare cases where it doesn't work it can
> > > > > > still be
> > >
> > > in
> > > > > > the body
> > > > > >
> > > > > > Jörn
> > > > > >
> >
> >
> >
> > --
>

Re: Commit message style

Posted by Joern Kottmann <ko...@gmail.com>.
Should we have a shared hook script that can be used for commit message
 validation?

Are there other things we would like to do with that?

Currently we can easily catch bad commit messages during review,
commits usually get squashed into one to not have all the feedback
commits in our history.

J�rn

On Wed, 2017-01-11 at 02:14 +0530, ARUN Thundyill Saseendran wrote:
> +1
> 
> Just to confirm,
> 
> *OPENNLP-xxx[,OPENNLP-yyy,...] : Commit Message*
> 
> Also will there be a pre-commit trigger in git to validate this.
> 
> Thanks
> Arun
> 
> On Wed, Jan 11, 2017 at 2:08 AM, Tommaso Teofili <tommaso.teofili@gma
> il.com>
> wrote:
> 
> > +1
> > 
> > Tommaso
> > 
> > Il giorno mar 10 gen 2017 alle ore 11:20 Rodrigo Agerri <
> > ragerri@apache.org>
> > ha scritto:
> > 
> > > +1 for the OPENNLP-xxx: commit message.
> > > 
> > > 
> > > 
> > > On Tue, Jan 10, 2017 at 12:51 AM, William Colen <william.colen@gm
> > > ail.com
> > > 
> > > wrote:
> > > 
> > > > +1 for the OPENNLP-xxx: commit message.
> > > > Fast to find a commit.
> > > > 
> > > > 
> > > > 2017-01-09 21:24 GMT-02:00 Joern Kottmann <ko...@gmail.com>:
> > > > 
> > > > > On Mon, 2017-01-09 at 17:02 -0500 <02%200500>, Jeffrey
> > > > > Zemerick
> > 
> > wrote:
> > > > > > I'm personally a fan of the issue number being the first
> > > > > > thing on
> > 
> > the
> > > > > > subject line, like "OPENNLP-xxx: commit message." For me it
> > > > > > gives a
> > > > > > consistent place to look for the issue without having to
> > > > > > read the
> > > > > > full
> > > > > > message. (That way you can also see the issue number in
> > > > > > GitHub's
> > > > > > commit
> > > > > > list without having to expand the commit.)
> > > > > 
> > > > > 
> > > > > Yes, it is also faster to write like that, on the other hand
> > > > > if the
> > > > > subject line is then too short to write something meaningful
> > > > > it is
> > > > > probably better to write it in the body instead.
> > > > > 
> > > > > +1 to write it first thing in the subject line in all cases
> > > > > where it
> > 
> > is
> > > > > possible, for very rare cases where it doesn't work it can
> > > > > still be
> > 
> > in
> > > > > the body
> > > > > 
> > > > > J�rn
> > > > > 
> 
> 
> 
> --

Re: Commit message style

Posted by ARUN Thundyill Saseendran <at...@gmail.com>.
+1

Just to confirm,

*OPENNLP-xxx[,OPENNLP-yyy,...] : Commit Message*

Also will there be a pre-commit trigger in git to validate this.

Thanks
Arun

On Wed, Jan 11, 2017 at 2:08 AM, Tommaso Teofili <to...@gmail.com>
wrote:

> +1
>
> Tommaso
>
> Il giorno mar 10 gen 2017 alle ore 11:20 Rodrigo Agerri <
> ragerri@apache.org>
> ha scritto:
>
> > +1 for the OPENNLP-xxx: commit message.
> >
> >
> >
> > On Tue, Jan 10, 2017 at 12:51 AM, William Colen <william.colen@gmail.com
> >
> > wrote:
> >
> > > +1 for the OPENNLP-xxx: commit message.
> > > Fast to find a commit.
> > >
> > >
> > > 2017-01-09 21:24 GMT-02:00 Joern Kottmann <ko...@gmail.com>:
> > >
> > > > On Mon, 2017-01-09 at 17:02 -0500 <02%200500>, Jeffrey Zemerick
> wrote:
> > > > > I'm personally a fan of the issue number being the first thing on
> the
> > > > > subject line, like "OPENNLP-xxx: commit message." For me it gives a
> > > > > consistent place to look for the issue without having to read the
> > > > > full
> > > > > message. (That way you can also see the issue number in GitHub's
> > > > > commit
> > > > > list without having to expand the commit.)
> > > >
> > > >
> > > > Yes, it is also faster to write like that, on the other hand if the
> > > > subject line is then too short to write something meaningful it is
> > > > probably better to write it in the body instead.
> > > >
> > > > +1 to write it first thing in the subject line in all cases where it
> is
> > > > possible, for very rare cases where it doesn't work it can still be
> in
> > > > the body
> > > >
> > > > Jörn
> > > >
> > >
> >
>



--

Re: Commit message style

Posted by Tommaso Teofili <to...@gmail.com>.
+1

Tommaso

Il giorno mar 10 gen 2017 alle ore 11:20 Rodrigo Agerri <ra...@apache.org>
ha scritto:

> +1 for the OPENNLP-xxx: commit message.
>
>
>
> On Tue, Jan 10, 2017 at 12:51 AM, William Colen <wi...@gmail.com>
> wrote:
>
> > +1 for the OPENNLP-xxx: commit message.
> > Fast to find a commit.
> >
> >
> > 2017-01-09 21:24 GMT-02:00 Joern Kottmann <ko...@gmail.com>:
> >
> > > On Mon, 2017-01-09 at 17:02 -0500 <02%200500>, Jeffrey Zemerick wrote:
> > > > I'm personally a fan of the issue number being the first thing on the
> > > > subject line, like "OPENNLP-xxx: commit message." For me it gives a
> > > > consistent place to look for the issue without having to read the
> > > > full
> > > > message. (That way you can also see the issue number in GitHub's
> > > > commit
> > > > list without having to expand the commit.)
> > >
> > >
> > > Yes, it is also faster to write like that, on the other hand if the
> > > subject line is then too short to write something meaningful it is
> > > probably better to write it in the body instead.
> > >
> > > +1 to write it first thing in the subject line in all cases where it is
> > > possible, for very rare cases where it doesn't work it can still be in
> > > the body
> > >
> > > Jörn
> > >
> >
>

Re: Commit message style

Posted by Rodrigo Agerri <ra...@apache.org>.
+1 for the OPENNLP-xxx: commit message.



On Tue, Jan 10, 2017 at 12:51 AM, William Colen <wi...@gmail.com>
wrote:

> +1 for the OPENNLP-xxx: commit message.
> Fast to find a commit.
>
>
> 2017-01-09 21:24 GMT-02:00 Joern Kottmann <ko...@gmail.com>:
>
> > On Mon, 2017-01-09 at 17:02 -0500, Jeffrey Zemerick wrote:
> > > I'm personally a fan of the issue number being the first thing on the
> > > subject line, like "OPENNLP-xxx: commit message." For me it gives a
> > > consistent place to look for the issue without having to read the
> > > full
> > > message. (That way you can also see the issue number in GitHub's
> > > commit
> > > list without having to expand the commit.)
> >
> >
> > Yes, it is also faster to write like that, on the other hand if the
> > subject line is then too short to write something meaningful it is
> > probably better to write it in the body instead.
> >
> > +1 to write it first thing in the subject line in all cases where it is
> > possible, for very rare cases where it doesn't work it can still be in
> > the body
> >
> > Jörn
> >
>

Re: Commit message style

Posted by William Colen <wi...@gmail.com>.
+1 for the OPENNLP-xxx: commit message.
Fast to find a commit.


2017-01-09 21:24 GMT-02:00 Joern Kottmann <ko...@gmail.com>:

> On Mon, 2017-01-09 at 17:02 -0500, Jeffrey Zemerick wrote:
> > I'm personally a fan of the issue number being the first thing on the
> > subject line, like "OPENNLP-xxx: commit message." For me it gives a
> > consistent place to look for the issue without having to read the
> > full
> > message. (That way you can also see the issue number in GitHub's
> > commit
> > list without having to expand the commit.)
>
>
> Yes, it is also faster to write like that, on the other hand if the
> subject line is then too short to write something meaningful it is
> probably better to write it in the body instead.
>
> +1 to write it first thing in the subject line in all cases where it is
> possible, for very rare cases where it doesn't work it can still be in
> the body
>
> Jörn
>

Re: Commit message style

Posted by Joern Kottmann <ko...@gmail.com>.
On Mon, 2017-01-09 at 17:02 -0500, Jeffrey Zemerick wrote:
> I'm personally a fan of the issue number being the first thing on the
> subject line, like "OPENNLP-xxx: commit message." For me it gives a
> consistent place to look for the issue without having to read the
> full
> message. (That way you can also see the issue number in GitHub's
> commit
> list without having to expand the commit.)


Yes, it is also faster to write like that, on the other hand if the
subject line is then too short to write something meaningful it is
probably better to write it in the body instead.

+1 to write it first thing in the subject line in all cases where it is
possible, for very rare cases where it doesn't work it can still be in
the body

J�rn

Re: Commit message style

Posted by Suneel Marthi <sm...@apache.org>.
On Mon, Jan 9, 2017 at 5:02 PM, Jeffrey Zemerick <jz...@apache.org>
wrote:

> I'm personally a fan of the issue number being the first thing on the
> subject line, like "OPENNLP-xxx: commit message." For me it gives a
> consistent place to look for the issue without having to read the full
> message. (That way you can also see the issue number in GitHub's commit
> list without having to expand the commit.)
>

+1


>
> On Mon, Jan 9, 2017 at 1:48 PM, Joern Kottmann <ko...@gmail.com> wrote:
>
> > It doesn't matter where the jira# is placed, as long as it is there.
> >
> > Can be in the first line or occur somewhere later in the message,
> > for example see OPENNLP-914. There it was placed in the body.
> >
> > Jörn
> >
> > On Mon, 2017-01-09 at 13:20 -0500, Suneel Marthi wrote:
> > > I guess the reason to include the jira# at the beginning of the
> > > message is
> > > because the same would be reflected in the corresponding jira (i
> > > could be
> > > wrong here).
> > >
> > > I am not sure if omitting the issue# in the git subject line would
> > > still
> > > reflect the git convo in jira or not.
> > >
> > >
> > >
> > > On Mon, Jan 9, 2017 at 8:26 AM, Joern Kottmann <ko...@gmail.com>
> > > wrote:
> > >
> > > > Hello all,
> > > >
> > > > we are using different styles for commit messages. It would be good
> > > > to have
> > > > a short discussion on how we think they should be and agree all on
> > > > how to
> > > > write the subject line.
> > > >
> > > > Here are few points from me:
> > > > - Good commit messages are important to understand what happened in
> > > > the
> > > > project and motivate to produce well thought through commits
> > > > - In git we have a subject line, first line in the commit message,
> > > > should
> > > > be around 50 chars, GH cuts after 72 chars and knows this
> > > > convention
> > > > - Subject line is usually written in imperative (git convention)
> > > > - Capitalize the first word (like in a new sentence)
> > > > - Commit message should contain the issue symbol
> > > >
> > > > Open questions:
> > > > - Should the issue symbol be in the subject line? Or in the body?
> > > > - Everyone fine with writing subject line in imperative?
> > > >
> > > > Here is an interesting article about it:
> > > > http://chris.beams.io/posts/git-commit/
> > > >
> > > > Jörn
> > > >
> >
>

Re: Commit message style

Posted by Jeffrey Zemerick <jz...@apache.org>.
I'm personally a fan of the issue number being the first thing on the
subject line, like "OPENNLP-xxx: commit message." For me it gives a
consistent place to look for the issue without having to read the full
message. (That way you can also see the issue number in GitHub's commit
list without having to expand the commit.)

On Mon, Jan 9, 2017 at 1:48 PM, Joern Kottmann <ko...@gmail.com> wrote:

> It doesn't matter where the jira# is placed, as long as it is there.
>
> Can be in the first line or occur somewhere later in the message,
> for example see OPENNLP-914. There it was placed in the body.
>
> Jörn
>
> On Mon, 2017-01-09 at 13:20 -0500, Suneel Marthi wrote:
> > I guess the reason to include the jira# at the beginning of the
> > message is
> > because the same would be reflected in the corresponding jira (i
> > could be
> > wrong here).
> >
> > I am not sure if omitting the issue# in the git subject line would
> > still
> > reflect the git convo in jira or not.
> >
> >
> >
> > On Mon, Jan 9, 2017 at 8:26 AM, Joern Kottmann <ko...@gmail.com>
> > wrote:
> >
> > > Hello all,
> > >
> > > we are using different styles for commit messages. It would be good
> > > to have
> > > a short discussion on how we think they should be and agree all on
> > > how to
> > > write the subject line.
> > >
> > > Here are few points from me:
> > > - Good commit messages are important to understand what happened in
> > > the
> > > project and motivate to produce well thought through commits
> > > - In git we have a subject line, first line in the commit message,
> > > should
> > > be around 50 chars, GH cuts after 72 chars and knows this
> > > convention
> > > - Subject line is usually written in imperative (git convention)
> > > - Capitalize the first word (like in a new sentence)
> > > - Commit message should contain the issue symbol
> > >
> > > Open questions:
> > > - Should the issue symbol be in the subject line? Or in the body?
> > > - Everyone fine with writing subject line in imperative?
> > >
> > > Here is an interesting article about it:
> > > http://chris.beams.io/posts/git-commit/
> > >
> > > Jörn
> > >
>

Re: Commit message style

Posted by Joern Kottmann <ko...@gmail.com>.
It doesn't matter where the jira# is placed, as long as it is there.

Can be in the first line or occur somewhere later in the message,
for example see OPENNLP-914. There it was placed in the body.

J�rn

On Mon, 2017-01-09 at 13:20 -0500, Suneel Marthi wrote:
> I guess the reason to include the jira# at the beginning of the
> message is
> because the same would be reflected in the corresponding jira (i
> could be
> wrong here).
> 
> I am not sure if omitting the issue# in the git subject line would
> still
> reflect the git convo in jira or not.
> 
> 
> 
> On Mon, Jan 9, 2017 at 8:26 AM, Joern Kottmann <ko...@gmail.com>
> wrote:
> 
> > Hello all,
> > 
> > we are using different styles for commit messages. It would be good
> > to have
> > a short discussion on how we think they should be and agree all on
> > how to
> > write the subject line.
> > 
> > Here are few points from me:
> > - Good commit messages are important to understand what happened in
> > the
> > project and motivate to produce well thought through commits
> > - In git we have a subject line, first line in the commit message,
> > should
> > be around 50 chars, GH cuts after 72 chars and knows this
> > convention
> > - Subject line is usually written in imperative (git convention)
> > - Capitalize the first word (like in a new sentence)
> > - Commit message should contain the issue symbol
> > 
> > Open questions:
> > - Should the issue symbol be in the subject line? Or in the body?
> > - Everyone fine with writing subject line in imperative?
> > 
> > Here is an interesting article about it:
> > http://chris.beams.io/posts/git-commit/
> > 
> > J�rn
> > 

Re: Commit message style

Posted by Suneel Marthi <sm...@apache.org>.
I guess the reason to include the jira# at the beginning of the message is
because the same would be reflected in the corresponding jira (i could be
wrong here).

I am not sure if omitting the issue# in the git subject line would still
reflect the git convo in jira or not.



On Mon, Jan 9, 2017 at 8:26 AM, Joern Kottmann <ko...@gmail.com> wrote:

> Hello all,
>
> we are using different styles for commit messages. It would be good to have
> a short discussion on how we think they should be and agree all on how to
> write the subject line.
>
> Here are few points from me:
> - Good commit messages are important to understand what happened in the
> project and motivate to produce well thought through commits
> - In git we have a subject line, first line in the commit message, should
> be around 50 chars, GH cuts after 72 chars and knows this convention
> - Subject line is usually written in imperative (git convention)
> - Capitalize the first word (like in a new sentence)
> - Commit message should contain the issue symbol
>
> Open questions:
> - Should the issue symbol be in the subject line? Or in the body?
> - Everyone fine with writing subject line in imperative?
>
> Here is an interesting article about it:
> http://chris.beams.io/posts/git-commit/
>
> Jörn
>