From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 1/7] git-download: Add some helpers. Date: Tue, 03 Jan 2017 13:28:45 +0100 Message-ID: <87bmvo8gzm.fsf@gnu.org> References: <20170102171958.32131-1-david@craven.ch> 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]:50722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOOCu-0003yO-Vy for guix-devel@gnu.org; Tue, 03 Jan 2017 07:28:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOOCu-0003o2-0c for guix-devel@gnu.org; Tue, 03 Jan 2017 07:28:48 -0500 In-Reply-To: <20170102171958.32131-1-david@craven.ch> (David Craven's message of "Mon, 2 Jan 2017 18:19:52 +0100") 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: David Craven Cc: guix-devel@gnu.org David Craven skribis: > * guix/git-download.scm (git-version, git-file-name): New variables. > --- > guix/git-download.scm | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/guix/git-download.scm b/guix/git-download.scm > index 81d1d4fbf..c453aaa6d 100644 > --- a/guix/git-download.scm > +++ b/guix/git-download.scm > @@ -30,7 +30,9 @@ > git-reference-commit > git-reference-recursive? >=20=20 > - git-fetch)) > + git-fetch > + git-version > + git-file-name)) >=20=20 > ;;; Commentary: > ;;; > @@ -110,4 +112,10 @@ HASH-ALGO (a symbol). Use NAME as the file name, or= a generic name if #f." > #:guile-for-build guile > #:local-build? #t))) >=20=20 > +(define (git-version version revision commit) > + (string-append version "-" revision "." (string-take commit 7))) > + > +(define (git-file-name name version) > + (string-append name "-" version "-checkout")) Please add a docstring. OK with this change, thank you! Ludo=E2=80=99.