git/list[1] front-page[2] threads[3] people[4] search[5] about
 

OT: Favourite log message layout

From
APAndy Parkins <andyparkins@gmail.com>
Date
Feb 28, 2007, 09:48 UTC
Message-ID
<200702280948.05391.andyparkins@gmail.com>
In-Reply-To
<Pine.LNX.4.64.0702271453030.12485@woody.linux-foundation.org>
On Tuesday 2007 February 27 23:02, Linus Torvalds wrote:
> I don't think the GNU style ChangeLog is particularly good. In fact, I
> think it has an unfortunate tendency (thanks to being per-file-log) to
> encourage people to commit unrelated changes and then explain them per
> file.

Me either; however, I do like per-file information. My own favoured format for log messages is (with all but the shortlog optional)

---- 8< ---- Short log message summarises changes in one line

Longer message summarises changes, perhaps with reasons for change and why this change fixes something.

file1.c
 * detailed description of change to this file
 * more changes
file2.c
 * detailed description of change to this file
---- >8 ----

That's not to say that this is an excuse to lump unrelated changes together, but it does allow one to say

 file1.c
  * Added function xyz()
 file2.c
  * Call new function xyz() to achieve clever feature

when it's appropriate. I've found this particularly useful in conjunction with git-blame. You find the revision that made a change in a particular file then the log message is easily searched to find the exact reasons for that change on that line in that file.

Perhaps I'm overly verbose though. I do like the sound of my own voice - even on log messages :-)

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
Previous: Johannes Schindelin
Message 18 of 18 in “show_date(): rename the "relative" parameter to "mode"”
  1. show_date(): rename the "relative" parameter to "mode"Johannes Schindelin, Feb 27, 2007
  2. Linus TorvaldsFeb 27, 2007
  3. Junio C HamanoFeb 27, 2007
  4. Linus TorvaldsFeb 27, 2007
  5. Johannes SchindelinFeb 27, 2007
  6. Linus TorvaldsFeb 27, 2007
  7. Johannes SchindelinFeb 27, 2007
  8. Junio C HamanoFeb 27, 2007
  9. Johannes SchindelinFeb 27, 2007
  10. Junio C HamanoFeb 27, 2007
  11. Johannes SchindelinFeb 27, 2007
  12. Linus TorvaldsFeb 27, 2007
  13. Johannes SchindelinFeb 27, 2007
  14. Linus TorvaldsFeb 27, 2007
  15. Johannes SchindelinFeb 27, 2007
  16. Linus TorvaldsFeb 27, 2007
  17. GNU ChangeLogs, was Re: [PATCH] show_date(): rename the "relative" parameter to "mode"Johannes Schindelin, Feb 27, 2007
  18. OT: Favourite log message layoutAndy Parkins, Feb 28, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.