[webkit-dev] Proposal: Commit messages should start with a one-line summary of the change

Mark Rowe mrowe at apple.com
Thu Jun 30 14:10:17 PDT 2011


On 2011-06-30, at 13:28, Adam Roben wrote:

> I'd like to propose that WebKit commit messages start with a one-line summary of the change.
> 
> This change would have two benefits:
> 
> 1) It would make it much easier to understand at a glance what the change actually does.
> 
> Our commit logs usually include a bug title, but the bug title only tells you about the problem, not about the solution.
> 
> 2) It would make many of our tools work better.
> 
> For instance, <http://trac.webkit.org/log/trunk> shows the first 75 characters or so of the commit message. Right now it's just a wall of dates and author names, which are already shown in other parts of the UI. It would show much more useful information if we had a one-line summary at the top of the commit message. As another example, pretty much all git-based tools assume the commit message starts with a one-line summary (e.g., git log --pretty=oneline, gitk, webkit-patch post-commits, etc.), and work much better when that is the case.
> 
> Since our commit messages are almost always just a copy of our ChangeLog entries, this should apply to ChangeLog entries too. Specifically, I suggest one line be added to our ChangeLog template, yielding the following:


> 2011-06-30  Adam Roben  <aroben at apple.com>
> 
>        Need a one-line summary of your change (OOPS!)
> 
>        Reviewed by NOBODY (OOPS!).
> 
>        Need a short description and bug URL (OOPS!)
> 
>        * FileIModified.cpp:

Most ChangeLog entries already have a one-line summary immediately after the "Reviewed by" line.  I'm not sure that there's any benefit to reordering these parts of the ChangeLog.

> Given this format, commit-log-editor will put the summary right at the top of the commit log. webkit-patch will require modifications to do this correctly, as represented by <https://bugs.webkit.org/show_bug.cgi?id=26755>.

commit-log-editor already does the right thing given our current format.  It's just that many people have switched to using webkit-patch, and it was never taught the correct format for commit messages.

- Mark



More information about the webkit-dev mailing list