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: Tue, 23 Feb 2016 12:53:00 +0100 Message-ID: <87bn77lk2r.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> <87fuxqwsm7.fsf@gnu.org> <20160221043515.GA17164@jasmine> <87bn7axw0w.fsf@gmail.com> <20160221225256.GA21678@jasmine> <87si0lbo4r.fsf@dustycloud.org> 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]:45405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYBWf-0007vu-N1 for guix-devel@gnu.org; Tue, 23 Feb 2016 06:53:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYBWe-0000dr-LX for guix-devel@gnu.org; Tue, 23 Feb 2016 06:53:09 -0500 In-Reply-To: <87si0lbo4r.fsf@dustycloud.org> (Christopher Allan Webber's message of "Sun, 21 Feb 2016 16:09:58 -0800") 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: Christopher Allan Webber Cc: guix-devel@gnu.org, Alex Kost Christopher Allan Webber skribis: > Leo Famulari writes: > >> On Sun, Feb 21, 2016 at 12:17:19PM +0300, Alex Kost wrote: >>> Leo Famulari (2016-02-21 07:35 +0300) wrote: >>>=20 >>> > On Thu, Jan 21, 2016 at 10:05:36PM +0100, Ludovic Court=C3=A8s wrote: >>> [...] >>> >> I prefer 7! This is how Git usually truncates SHA1s, so it can=E2= =80=99t be wrong. >>> > >>> > I stumbled across this email earlier, which reminded me of this >>> > discussion about hash lengths: >>> > https://lkml.org/lkml/2010/10/28/287 >>> > >>> > There are currently 13 7-character hash collisions in Guix's git repo: >>> > >>> > $ git rev-list --objects --all | cut -c1-7 | sort | uniq -dc >>> > 2 0d2b24c >>> > 2 11e0632 >>> > 2 1f3ab8d >>> > 2 229bd6c >>> > 2 7c4a7b7 >>> > 2 9ff8b63 >>> > 2 aa27b56 >>> > 2 c10c562 >>> > 2 d96cdce >>> > 2 dab4329 >>> > 2 dc27d1c >>> > 2 ea119a2 >>> > 2 f56cc27 >>>=20 >>> Hm, when I tried "git rev-list --objects --all" I got some ridiculous >>> number of lines (I pressed C-c C-c after about 78000 lines). Does this >>> command really do what you wanted? (I'm sorry I didn't RTFM well enough >>> to understand what it does). >> >> It lists the objects in the repository, so not just commits. I'm not >> presenting this as evidence that something is wrong with our repo, just >> that 7 characters is not enough to unambiguously refer to things in git >> repos of projects our size. For example, with `git show`. >> >> It's more of an informational link than a call to action. Although I am >> updating all of our uses of git-reference to use the method we agreed >> upon upthread, before any of those upstream repos grow too large for the >> identifiers we are currently using. > > Yes, short identifiers probably should not be relied upon. Agreed. The manual suggests using full-length hashes to identify commits (info "(guix) Version Numbers"). Commit 561360a (or should I say 561360a589d2bea0b01b38aa9049b8e69cfad2e7? :-)) adds an example of this. It would be nice to have =E2=80=98guix lint=E2=80=99 check for show commit = IDs in =E2=80=98git-reference=E2=80=99 objects. Ludo=E2=80=99.