git commit messages

3 views
Skip to first unread message

Laurent Savaëte

unread,
Jan 1, 2013, 12:34:59 PM1/1/13
to ductus-d...@googlegroups.com
I thought I'd throw a couple of lines here to mention that I started
formatting commit messages like
[NNN] rest of commit message
where NNN is a trac ticket number, so as to make it easier to find
relevant info about various commits.
I don't think this will cause any controversy, but I thought I'd mention
it here. It could be good to open tickets for non trivial tasks, just to
use them as support for discussion, and documenting the rationale for
changes, etc...

Jim Garrison

unread,
Jan 1, 2013, 1:40:40 PM1/1/13
to ductus-d...@googlegroups.com
I think this is great. Traditionally I always used messages like

Fixed #25. Users can now enter their email addresses.

assuming the entire fix was in one commit. I chose this because Django
uses the same style, and there are some plugins for trac which will
automatically close a ticket if you format it that way in the commit
message. If a commit relates to a ticket but does not close it, I think
the method you propose works great.

One thing we may wish to do is instead use [#NNN] or [ticket:NNN] in the
commit message. This way, you will be able to click on the number any
time the commit message is listed in trac, e.g. at
https://code.ductus.us/timeline

Laurent Savaëte

unread,
Jan 1, 2013, 1:57:17 PM1/1/13
to ductus-d...@googlegroups.com


On Tue 01 Jan 2013 07:40:40 PM CET, Jim Garrison wrote:
> I think this is great. Traditionally I always used messages like
>
> Fixed #25. Users can now enter their email addresses.
>
> assuming the entire fix was in one commit. I chose this because Django
> uses the same style, and there are some plugins for trac which will
> automatically close a ticket if you format it that way in the commit

we don't actually use those plugins, do we?

> message. If a commit relates to a ticket but does not close it, I think
> the method you propose works great.
>
> One thing we may wish to do is instead use [#NNN] or [ticket:NNN] in the
> commit message. This way, you will be able to click on the number any
> time the commit message is listed in trac, e.g. at
> https://code.ductus.us/timeline

Nice tweak!
So to summarize:
[#NNN] commit message
for commits related to ticket NNN

Fixed #NNN. another commit message
for commits closing a ticket.

Jim Garrison

unread,
Jan 1, 2013, 2:07:15 PM1/1/13
to ductus-d...@googlegroups.com
On 01/01/13 13:57, Laurent Savaëte wrote:
>
>
> On Tue 01 Jan 2013 07:40:40 PM CET, Jim Garrison wrote:
>> I think this is great. Traditionally I always used messages like
>>
>> Fixed #25. Users can now enter their email addresses.
>>
>> assuming the entire fix was in one commit. I chose this because Django
>> uses the same style, and there are some plugins for trac which will
>> automatically close a ticket if you format it that way in the commit
>
> we don't actually use those plugins, do we?

No, we do not.

>> message. If a commit relates to a ticket but does not close it, I think
>> the method you propose works great.
>>
>> One thing we may wish to do is instead use [#NNN] or [ticket:NNN] in the
>> commit message. This way, you will be able to click on the number any
>> time the commit message is listed in trac, e.g. at
>> https://code.ductus.us/timeline
>
> Nice tweak!
> So to summarize:
> [#NNN] commit message
> for commits related to ticket NNN
>
> Fixed #NNN. another commit message
> for commits closing a ticket.

Sounds perfect.
Reply all
Reply to author
Forward
0 new messages