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] guix: git: Support shallow git clones if a tag is available Date: Tue, 25 Aug 2015 16:02:01 +0200 Message-ID: <876143o49y.fsf@gnu.org> References: <1439893929.575691.5108@rusty> 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]:41362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUEno-0000BT-0C for guix-devel@gnu.org; Tue, 25 Aug 2015 10:02:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUEni-0007wS-7X for guix-devel@gnu.org; Tue, 25 Aug 2015 10:02:15 -0400 In-Reply-To: <1439893929.575691.5108@rusty> (Andy Wingo's message of "Tue, 18 Aug 2015 10:03:06 +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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andy Wingo Cc: guix-devel@gnu.org Andy Wingo skribis: > * guix/build/git.scm (git-fetch): Instead of cloning the remote repo, use= the > lower-level "init" / "fetch" / "checkout" operations. This lets us mak= e a > shallow checkout if we are checking out a tag. > > * guix/git-download.scm (): Add tag field. > (git-fetch): Support git references with tags but no commits. This sounds like a nice improvement. Please move the =E2=80=9CThis lets us= =E2=80=9D sentence to a comment, and drop the newline between entries. > --- a/guix/build/git.scm > +++ b/guix/build/git.scm Make sure to add a copyright line in there. [...] > git-reference make-git-reference > git-reference? > (url git-reference-url) > - (commit git-reference-commit) > + (commit git-reference-commit (default #f)) > + (tag git-reference-tag (default #f)) So far we=E2=80=99ve been using =E2=80=98commit=E2=80=99 to denote commits = or tags. I guess a bunch of packages will need to be updated. There=E2=80=99s the issue that one could erroneously specify both =E2=80=98= commit=E2=80=99 and =E2=80=98tag=E2=80=99, and then one of them would be ignored. What about doing something like: 1. renaming =E2=80=98commit=E2=80=99 to =E2=80=98spec=E2=80=99; 2. adding a =E2=80=98type=E2=80=99 field which would default to 'commit a= nd could be changed to 'tag ? > + ;; FIXME: Pass #:tag when fixed daemons are widely > + ;; deployed. > + ;; #:tag '#$(git-reference-tag ref) The daemon is not involved here, AFAICS, so you can uncomment the line. Thanks, Ludo=E2=80=99.