git: d3ba089a5212 - main - Update to version 2.2.13.

Michael Gmelin grembo at freebsd.org
Tue Apr 20 09:25:24 UTC 2021



> On 20. Apr 2021, at 10:57, Dmitry Sivachenko <demon at freebsd.org> wrote:
> 
> 
> 
>>> On 20 Apr 2021, at 02:07, Michael Gmelin <grembo at FreeBSD.org> wrote:
>>> 
>>> 
>>> 
>>>> On 20. Apr 2021, at 00:24, Dmitry Sivachenko <demon at freebsd.org> wrote:
>>> 
>>> 
>>> 
>>>> On 20 Apr 2021, at 01:17, Yuri <yuri at FreeBSD.org> wrote:
>>>> 
>>>> On 4/19/21 3:13 PM, Dmitry Sivachenko wrote:
>>>>>   Update to version 2.2.13.
>>>> 
>>>> 
>>>> Why didn't you mention in the commit message what port was updated?
>>>> net/haproxy is one of thousands of ports and having a message like this doesn't help to understand what the change is.
>>>> 
>>> 
>>> Hello,
>>> 
>>> what do you mean 'what port was updated'?  It is clean from the commit log that it is net/haproxy that was updated, only two files changed:
>>>  Update to version 2.2.13.
>>> ---
>>> net/haproxy/Makefile | 2 +-
>>> net/haproxy/distinfo | 6 +++---
>>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>> 
>>> 
>>> Or may be I am missing something...
>> 
>> The idea is to prefix the first line of the commit with <category>/<name>:, so it’s easier to understand which port was changed when looking at a list of commits.
>> 
>> See here for an example of why this helps:
>> https://cgit.freebsd.org/ports/log/
>> 
> 
> 
> Aha, I see now.  I used to think that commit log should describe what has changed, and commit logs are just tool.
> But things changed and now we should think how commit log will look in mail client provided you read only subject line  :)

Well, it’s not so much about mail clients (but it helps there too). Most tools handling git commits work this way (present first line of commit as a kind of subject in file trees and short commit logs), that includes cgit, GitHub, gitlab, phabricator, gitweb. It also helps when dealing with git's internal feature features like merging, rebasing, cherry-picking commits etc. It’s basically a convention that evolved over time that’s especially useful when dealing with the ports collection.

Best,
Michael

p.s. It also helps when looking at git logs on the command line, a nice little trick I found in a blog about a decade ago is (Google for "git lola" to find the original post):

Copy the following into ~/.gitconfig for your full color git lola action:

[alias]
        lol = log --graph --decorate --pretty=oneline --abbrev-commit
        lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
[color]
        branch = auto
        diff = auto
        interactive = auto
        status = auto

Then run `git lola' on your workdir.





More information about the dev-commits-ports-all mailing list