From owner-freebsd-git@freebsd.org Thu May 30 06:48:36 2019 Return-Path: Delivered-To: freebsd-git@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AE6D15B9DB2 for ; Thu, 30 May 2019 06:48:36 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "anubis.delphij.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A720A738D6; Thu, 30 May 2019 06:48:35 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from odin.corp.delphij.net (unknown [IPv6:2601:646:8600:d04a:d43d:b15c:ee35:c8dc]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 4F3DB49530; Wed, 29 May 2019 23:48:34 -0700 (PDT) Reply-To: d@delphij.net Subject: Re: Git handling of commit times To: Ed Maste , Grzegorz Junka Cc: freebsd-git@freebsd.org References: <8697933A-B813-4088-90B7-A84589C3CD33@freebsd.org> <6fb4c8cb-7f59-872e-4de6-a8a02e7c4e29@gjunka.com> From: Xin Li Openpgp: preference=signencrypt Autocrypt: addr=delphij@delphij.net; prefer-encrypt=mutual; keydata= mQINBFuSR4oBEACvvEgwRIHs6IcSP/yaDtySF78Ji3rP29qdiQsxhMsOtvtffdbS56VApIWO UFb3/iN2gA8HwLvrmjijN0HEoLVX7na1WARmxRYzQMtApsZIUTtx7hnUYlsi2F5odZa6CDW9 a954DLRzYxiUwYDcu5Zjl9bglK1H8e/N9uC0Vuigr4teWfh86brzOyf819QzwFVYfMIK4ihw QGwMvTzbyVuCFy+LENkmcVY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+Qy0pXyFAVxLM4hNIBoIDYfK9BcwrBYf7AwSKrH0GiNwFpgHCkbZd6qoZy2gB+adTnCpVCTJ KJetsH/8awkrChJWMK0ckGf3EeWMPvawG7kW7FBz70NYEZ0pOMiaEZNVtzD3wwbYWUiDFYth 83XGglOExg+1ShTW5XjQPRrdyJAO+aUW4o3lVjfyUJXMgI4rmhMiLVm06GuNrbpKIF0s+4Vd jQAjhrDQjfoXi9CkfsA/cONseuHNv1JGj3RqHiqHJq1dbrpodXp925zGDAnUGxCOBPoFopAH gVzR89GTut059GpwqsddZmU6y7rqifuam/ekJ+QRwc16vgt7pHqCrTY8WPxRZr2UpFU1wlTo COdeiFep1gq1F9jzFjJnoMaAdmC6k7bgAA+RQusOgIhJL0jIej7DoAHxmxFFCfRy+lDtpXwF gQ8HMvzHI65QWmQnMo7s6SQH/ZH5s1yR6SJq8+3lDz+dCuT42qJVqIPVvxd10LW0FNN+t7HF eLadU6ekSgD13/EYMYXlvNHkw7dAItSDxIzgRyykLz0bCU9xwNWoS4Z43+ifF9anJ+uR0ltW El1j++h6ZrD3LLuCgJIt1so0m49GzdcSpOI7LCwMlacyvafiEyjUn+tSNDsnfw== Message-ID: <321bbbd8-95af-ccab-fde7-f6def8b4176c@delphij.net> Date: Wed, 29 May 2019 23:48:29 -0700 User-Agent: Thunderbird MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bgZ0XI6x3KUlXW79z4yRhPYI34lnfMmit" X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.29 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: Thu, 30 May 2019 06:48:36 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bgZ0XI6x3KUlXW79z4yRhPYI34lnfMmit Content-Type: multipart/mixed; boundary="LRteMQGAcXstmUGdVtss018iUJhSvht6b"; protected-headers="v1" From: Xin Li Reply-To: d@delphij.net To: Ed Maste , Grzegorz Junka Cc: freebsd-git@freebsd.org Message-ID: <321bbbd8-95af-ccab-fde7-f6def8b4176c@delphij.net> Subject: Re: Git handling of commit times References: <8697933A-B813-4088-90B7-A84589C3CD33@freebsd.org> <6fb4c8cb-7f59-872e-4de6-a8a02e7c4e29@gjunka.com> In-Reply-To: --LRteMQGAcXstmUGdVtss018iUJhSvht6b Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/29/19 10:08, Ed Maste wrote: > On Wed, 29 May 2019 at 11:40, Grzegorz Junka wrote: >> >> Timestamp alone doesn't give much information. What matters is when th= e >> branch in which the commit was added has been merged with other branch= es >> (shown as merge commits in the history). >=20 > Our history is mostly devoid of merges though, but your broader point > is certainly valid - the relationship that's actually important is the > parent/child commits, not the order of either date stamp. >=20 >> Bear in mind that commits are local (by the virtue of git being >> distributed scm). You can certainly write a git hook that verifies loc= al >> time to be approximately the same as server time and stop the commit i= f >> that's not the case. But that's clunky and patronizing in my opinion\ >> (e.g. someone won't be able to commit when on a train and off the grid= ). >=20 > I'm not suggesting that we require the commit time to be close to the > server time, just that we could disallow two actually invalid cases: >=20 > - commit time is earlier than parent(s) > - commit time is later than the (accurate) server time >=20 > If you have local commits made while on the train and someone else > pushes to the canonical repository before you're back online you're > going to have to merge or rebase, and will then have an updated commit > time. >=20 > The solution to this issue triggering is easy - just make sure the > client has the correct time. Or, have the server perform the required operation (a merge, or a rebase) on behalf of the user, based on CI result, etc. >> Git commits are joined by hashes, timestamp is only some metadata. It >> makes sens to talk about amount of commits since a particular hash but= >> not so much about amount of commits since a particular date. >=20 > Indeed, but that said developers like to think in terms like "commits > since a particular date", and we should provide a good experience > there if we can do so without restricting realistic workflows. Assuming the dates are trustworthy (e.g. the merge or rebase was performed by the server), that can be accomplished with e.g. git log --since. Practically, I think it's more useful to do e.g. git log release/11.1..HEAD and I'm not particularly worried if the dates were not that accurate. Cheers, --LRteMQGAcXstmUGdVtss018iUJhSvht6b-- --bgZ0XI6x3KUlXW79z4yRhPYI34lnfMmit Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJc73zBAAoJEEB5f3yV9INPaS0QAK3zU4mNB3fz3ykxkFiVhGyO bChY36hCj8I9PuvP7wVRSQCNj9NiLK5z/3a5DM4wBoUWzburLyDXZZLm3f9lO4c7 nbeejzQ/wSi6Eld552dS4zk6T87YfUQsAuHB9BisTTpIy2vkIv/CHmmi9sqeAKog /oZAzIrt19svUI4Ft0cmwJimNmxIKXwVp/r9s7RVjCOuODTYVDO4bBPw2fxxBc9O lPbdajis0JXGQE0pf3v+mgmplwNylDZR56pziLUVi0EBiUyeAeRtG0KcIqr9DxL1 WD/k1UT2P4BaONz8LN/2a6oUSr5TPK7QLqYI5GVkjGlWSXhenrDrIv7+yPXJ+uZA j1uwk4+/JiPPI4I4vVNV0Mxr0+c4FODTlH61hpFIs1Z/6OqHMJHqG/MsKgemPoYL O/UmvR8Dc6vjVSvkKHJYvLtSn9icovSkSoZ+FQmKJn+E4qAiN7hDMb+fRawSPNKQ IPxBIZSdSi7iBYyvKg1fJ1IftUlmX/g37UGSJTNRzGFFTCLN9ahmSMfLi2Htb27H uJAEkFAox7M699+FAH5545KmlfQCFCN47FiS3wHGYsiTu8XoMEgDELi6rD1wb9Pb MJKviViu7iYVSYo2Wnl0atQeC6OI1kZXwiXp6BBjP0TkrNJB5imk4GAFC4QgsHc7 FXLg3pBIwC4/EUb+RMj8 =R9+V -----END PGP SIGNATURE----- --bgZ0XI6x3KUlXW79z4yRhPYI34lnfMmit--