From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vagrant Cascadian Subject: Re: Better names for Guix versions from git? Date: Sat, 29 Dec 2018 18:48:24 -0800 Message-ID: <87sgyfrapz.fsf@ponder.i-did-not-set--mail-host-address--so-tickle-me> References: <87lg4dwfmt.fsf@gmail.com> <351d14fe-0edd-6575-939d-981598b65255@riseup.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gdRJi-0002zj-HB for guix-devel@gnu.org; Sat, 29 Dec 2018 21:59:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gdR9p-0001Io-G4 for guix-devel@gnu.org; Sat, 29 Dec 2018 21:48:54 -0500 Received: from cascadia.aikidev.net ([2600:3c01:e000:267:0:a171:de7:c]:36274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gdR9o-0001Du-Vk for guix-devel@gnu.org; Sat, 29 Dec 2018 21:48:53 -0500 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 3D1791AAC0 for ; Sat, 29 Dec 2018 18:48:49 -0800 (PST) In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2018-12-26, G=C3=A1bor Boskovits wrote: > swedebugia ezt =C3=ADrta (id=C5=91pont: 2018. dec= . 25., K, 22:39): >> On 2018-12-25 20:49, Taylan Kammer wrote: >> > Currently, after running 'guix pull', the Guix version will be reported >> > by 'guix --version' as something like: >> > >> > 522d1b87bc88dd459ade51b1ee0545937da8d3b5 >> > >> > I think it would be really nice if instead it were something like: >> > >> > 2018-12-25-522d1b >> > >> > where the date is the commit's date (year, month, day) in UTC+0. The problem with dates from git commits is that git makes no attempt to keep commits in cronological order, and timezone adds interesting issues to the mix. For example: $ git log c180017b6f7e9b6d23238c1fbaac986c435cd35e | head -n 50 | grep =2DE ^'commit|Date' commit c180017b6f7e9b6d23238c1fbaac986c435cd35e Date: Tue Dec 25 16:29:12 2018 +0200 commit 039ccc7118b0a6d0cb09e9cab5caf9f629197d03 Date: Tue Nov 20 17:46:24 2018 +0100 commit 5923102f7b58f0a0120926ec5b81ed48b26a188e Date: Thu Dec 27 11:54:55 2018 +0100 commit ad3c9fbbb9fbc1080c9205d991960494ebe22586 Date: Thu Dec 27 11:53:14 2018 +0100 commit 912f44005dfbf0855d1e5bbc633094bc9456e80b Date: Thu Dec 27 09:46:40 2018 +0100 The most recent commit is from the 25th of December, Followed by the 20th of November, followed by several commits from December 27th... So while I agree that it would be nice to have a date in the version, I'm not sure where you would pull a meaningful date from. > What do you think about a git describe like output? > This gives on current master: v0.16.0-362-g10275b746 > this means the current branch is based on annotated tag > v0.16.0, 362 commits are added on top, and > the sort commit id is 10275b746. Showing the relative version compared to the last tagged version makes a lot of sense to me! It's done in a way that, at least within a specific branch (presuming no rebases), the versions can be trivially compared to know which is the most current. I'd been meaning to ask about this very topic, thanks for bringing it up! live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXCgx+AAKCRDcUY/If5cW qpbuAQDRdJl4VNcrVxvLGEPIpSiH5unVUjwfuUjcRB/+x8/UIwEA6Egbb9nkaND1 IdPw3/pPXfWhAuzh749lwQJfV+uhfwk= =okto -----END PGP SIGNATURE----- --=-=-=--