commit message style

John Arbash Meinel john at arbash-meinel.com
Sat Sep 9 17:08:45 BST 2006


Martin Pool wrote:
> I just noticed while looking at Robert's sexy revision number output
> that some of the commit messages are very wide. 

Yeah. I'm to blame for some of this. I almost universally use 'bzr
commit -m ', and while I try to remember to wrap. I frequently am just
trying to get written down what I need to say.

Also, as Robert mentioned, we can't do multiline commit messages to the
pqm. So in the short term, if we have a lot to say, it has to be on one
line.

> 
> I think we should try to write them in the same basic style as Python
> docstrings, i.e.:
> 
>  - Less than 80 columns.
>  - First line should be a self-contained summary in one sentence or 
>    phrase.
>  - One blank line following the summary.
>  - The rest can use simple bullet points if you want (or any subset of 
>    ReST).
> 
> I think we all recognize how this helps in code; it can make our history
> look good too -- and we want bzr's history to set a good example.

I will try harder to do it. One thing that might help me, is if there
was a way to do 'bzr commit' and have it *not* take the time to do a
diff/status. I pretty much always review them before I get to the 'bzr
commit' step. And it takes too long to pop up the editor when I run that
way.

> 
> You can write these easily in a commit editor or by preparing a message
> as you work, or with a multi-line quoted string in bash or zsh, or in
> dvcs, or in the emacs command-line editor.  The only issue is that you
> apparently cannot write a multi-line commit message in vim.  That's not
> really an excuse though. :-)  Just write a message file first.  (Or
> perhaps we should write a tiny macro to prompt for a message and
> commit.)
> 

I just configured vim with this line in ~/.vim/filetype.vim:
au BufNewFile,BufRead bzr_log.* setlocal tw=74 ts=4 sts=4 et ai nosi

So I'll try to use plain 'bzr commit' and have it keep my statements
succinct for the first line.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060909/33f53380/attachment.pgp 


More information about the bazaar mailing list