From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] guix hash: -g hashes a git repository Date: Tue, 04 Apr 2017 14:21:47 +0200 Message-ID: <87o9wcs6qs.fsf@gnu.org> References: <20170403195837.4504-1-wingo@igalia.com> 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]:33929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvNT7-00052F-EG for guix-devel@gnu.org; Tue, 04 Apr 2017 08:21:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvNT4-0004NS-8n for guix-devel@gnu.org; Tue, 04 Apr 2017 08:21:53 -0400 In-Reply-To: <20170403195837.4504-1-wingo@igalia.com> (Andy Wingo's message of "Mon, 3 Apr 2017 21:58:37 +0200") 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: Andy Wingo Cc: guix-devel@gnu.org Hello! Andy Wingo skribis: > * guix/scripts/hash.scm (show-help, %options): Add -g option. > (guix-hash): Support hashing of Git URLs. > * doc/guix.texi (Invoking guix hash): Document guix hash --git. [...] > +For example: > +@example > +$ git clone http://example.org/foo.git > +$ guix hash -g foo > +@end example In this case -g is equivalent to -rx. > +Or even: > +@example > +$ guix hash -g http://example.org/foo.git > +@end example > @end table This one is indeed simpler. However, one typically needs to get the commit id in addition to the hash, so it seems that in practice, most of the time, we=E2=80=99d still need to do: git clone http://=E2=80=A6 cd foo git log | head -1 guix hash -rx . so we have both the commit id and the content hash. WDYT? Thanks, Ludo=E2=80=99.