From owner-freebsd-git@freebsd.org Wed Dec 16 22:29:09 2020 Return-Path: Delivered-To: freebsd-git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD5624C88B2 for ; Wed, 16 Dec 2020 22:29:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4Cx8tY5jF4z4VC5 for ; Wed, 16 Dec 2020 22:29:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: by mailman.nyi.freebsd.org (Postfix) id C22094C86C6; Wed, 16 Dec 2020 22:29:09 +0000 (UTC) Delivered-To: git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C1DC64C87D1 for ; Wed, 16 Dec 2020 22:29:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cx8tY4wVNz4TtJ; Wed, 16 Dec 2020 22:29:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:891d:fb18:e1d8:8a71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 3F9D9CEB1; Wed, 16 Dec 2020 22:29:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: Thoughts on git commit mail To: Li-Wen Hsu Cc: git@freebsd.org References: From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <22b040fa-6afa-2453-3d84-f26bce0e5132@FreeBSD.org> Date: Wed, 16 Dec 2020 14:29:08 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2020 22:29:09 -0000 On 12/16/20 2:23 AM, Li-Wen Hsu wrote: > On Wed, Dec 16, 2020 at 7:59 AM John Baldwin wrote: >> >> 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: > > Thanks for the inputs and I'll try to squeeze time to implement them, > and/or find a suitable place to put the insensitive config files and > scripts for let more people to join the development. Certainly we should get some consensus on the format and if we make changes, batch them up and only make them once. I was trying to kick start that discussion. >> 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 >> Date: 2020-12-13 21:31:39 +0000 >> Branch: main >> URL: https://cgit.FreeBSD.org/doc/commit/?id=d79b57d3cf7151e45216c0f8501cdb2eb7a3bd86 > > This sounds good to me, the reason I have both Author and Committer > fields because I was thinking if we have pull request / merge > workflow, there will be more commits and pushes with different > author/committer/pusher, and the date of these three will be > different, the From and Date fields in mail header can only cover the > pusher. FWIW, to keep a clean liner history, GDB's policy is that committers always do a 'git rebase --ignore-date' prior to pushing to master which results in only a single effective date. It also means that dates and times are monotonic in 'git log' which I find to be a feature. >> 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. > > I don't quite get these, can you provide some examples to help me > understand them thoroughly? Do you mean we can have something like we > have in svn, there are the paths (directories) touched in the subject > and headers? This was not implemented when the doc migration due to > the time constraint, but I'll look into them after the higher priority > items in the migration are done. So I'm not sure what the best approach to follow here is. I think trying to list all the subdirectories affected in separate headers (e.g. X-Git-Subdir) would be expensive to generate, but maybe that wouldn't be the worst thing (e.g. my kernel-request could then just match on if there's an 'X-Git-Subdir' header that matches 'sys*'). The other options might be to add specific custom headers such as 'X-Git-Kernel: yes' for commits that touch the kernel. To be clear, this also falls more under "would be nice to have" than a "must". -- John Baldwin