Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 2020 15:59:03 -0800
From:      John Baldwin <jhb@FreeBSD.org>
To:        git@FreeBSD.org
Subject:   Thoughts on git commit mail
Message-ID:  <f90b2357-f13a-44da-42b7-c439f033f218@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
So far I have a few possible suggestions on the git commit mail
that I would find useful.  Mostly it consists of making it a bit
leaner:

1) I would only display Author/AuthorDate.  The committer we can
   infer from the e-mail sender.  This is what the gdb git commit
   mails do.  In this case you can also just use 'Date' instead
   of AuthorDate, e.g.:

commit d79b57d3cf7151e45216c0f8501cdb2eb7a3bd86
Author:     Glen Barber <gjb@FreeBSD.org>
AuthorDate: 2020-12-13 21:31:39 +0000
Commit:     Glen Barber <gjb@FreeBSD.org>
CommitDate: 2020-12-13 21:31:39 +0000

could become:

commit d79b57d3cf7151e45216c0f8501cdb2eb7a3bd86
Author: Glen Barber <gjb@FreeBSD.org>
Date:   2020-12-13 21:31:39 +0000

2) I would drop the first sentence.  It's a bit redundant to list
   the committer an extra time.  The branch name is useful, but it
   might be nicer as metadata if possible, e.g.:

Branch: main

   The one thing this does lose is when a commit is a "cross-repo"
   commit (e.g. docs committer committing to src or vice versa).
   The best way to handle this might be to add a new optional
   metadata field.  I don't have any good ideas on what to call
   it.  It could either list the repositories a committer has a
   bit for, or it could just be some kind of boolean
   (Cross-Commit: yes).

3) Perhaps put the URL in the metadata section as well to reduce
   extra blank lines at the start of the mail.

Putting 1-3 together for the commit in question would give the
header below which I think is a bit more compact and similar to
svn formatting in that all the metadata is in a single block
without additional whitespace.

commit d79b57d3cf7151e45216c0f8501cdb2eb7a3bd86
Author: Glen Barber <gjb@FreeBSD.org>
Date:   2020-12-13 21:31:39 +0000
Branch: main
URL:    https://cgit.FreeBSD.org/doc/commit/?id=d79b57d3cf7151e45216c0f8501cdb2eb7a3bd86

4) Some repository-specific things I would find helpful based on how
   I have filtered svn commits:

   - For doc, some kind of mail header ('X-Git-Foo') to indicate commits that
     only touch translations as separate from English and top-level shared
     areas.  Previously I used some pattern matches on paths in svn subjects
     to do this.

   - For src, some kind of mail header to indicate commits that touch the
     kernel vs only touching userland.


-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f90b2357-f13a-44da-42b7-c439f033f218>