From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Version numbers for VCS snapshots Date: Thu, 21 Jan 2016 22:05:36 +0100 Message-ID: <87fuxqwsm7.fsf@gnu.org> References: <874mem8mwx.fsf@gnu.org> <8737u344ov.fsf@elephly.net> <87twmjp2qs.fsf_-_@gnu.org> <56A063D1.80608@uq.edu.au> <20160121062251.GA25513@jasmine> <20160121184424.GB12122@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMMQK-0000ae-NQ for guix-devel@gnu.org; Thu, 21 Jan 2016 16:05:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMMQF-0007iZ-VF for guix-devel@gnu.org; Thu, 21 Jan 2016 16:05:44 -0500 In-Reply-To: <20160121184424.GB12122@jasmine> (Leo Famulari's message of "Thu, 21 Jan 2016 13:44:24 -0500") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Leo Famulari Cc: guix-devel@gnu.org Leo Famulari skribis: > On Thu, Jan 21, 2016 at 10:40:41AM +0100, Ricardo Wurmus wrote: >>=20 >> Leo Famulari writes: >>=20 >> > That sounds good to me. There was some discussion of how much of the >> > hash to keep here: >> > http://lists.gnu.org/archive/html/guix-devel/2015-12/msg00136.html >> > >> > I like this method that I've seen in some of the packages, because it >> > keeps the version tidy while preserving the full hash: >> > >> > --8<---------------cut here---------------start------------->8--- >> > (define-public hello >> > (let ((commit "e8e46123cfe62170a2f7f79db6b471b66ae36947")) >> > (package >> > (name "hello") >> > (version (string-append "2.10-1" (string-take commit 8))) >> > (source (origin >> > (method git-fetch) >> > (uri (git-reference >> > (url "git://git.sv.gnu.org/hello.git") >> > (commit commit))) >> > (sha256 >> > [...] >> > --8<---------------cut here---------------end--------------->8--- >>=20 >> I like this approach (though I=E2=80=99ve been taking 9 characters of th= e commit >> ;)). > > I like 10 but I wanted to match your example upthread ;) I prefer 7! This is how Git usually truncates SHA1s, so it can=E2=80=99t b= e wrong. Ludo=E2=80=99.