From mboxrd@z Thu Jan 1 00:00:00 1970 From: "ng0" Subject: Re: [PATCH 1/7] guix: git: Support shallow git clones if a tag is available Date: Thu, 02 Feb 2017 20:33:54 +0000 Message-ID: <87wpd8bag0.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> References: <1439893929.575691.5108@rusty> <876143o49y.fsf@gnu.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]:40580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZO3Y-0008Cl-Up for guix-devel@gnu.org; Thu, 02 Feb 2017 15:32:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZO3U-0003l2-Qx for guix-devel@gnu.org; Thu, 02 Feb 2017 15:32:36 -0500 In-reply-to: <876143o49y.fsf@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s writes: > 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 = make 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 let= s 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 comm= its 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= =98commit=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 'comm= it and could be > changed to 'tag > > ? Was the idea here to change the code to make use of spec inside the package definitions and other modules which use git-fetch, so that all instances of "commit" have to be replaced? I have Andy's patch applied now, but to debug the outcome of this (commit is no longer a bound variable), I need to know what the intention was. >> + ;; 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. --=20 ng0 . https://www.inventati.org/patternsinthechaos/