From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iHQtHCDETWH9FAAAgWs5BA (envelope-from ) for ; Fri, 24 Sep 2021 14:27:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aDOxFyDETWGHWwAAbx9fmQ (envelope-from ) for ; Fri, 24 Sep 2021 12:27:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 24FDB8FAD for ; Fri, 24 Sep 2021 14:27:12 +0200 (CEST) Received: from localhost ([::1]:38626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTkIJ-0002mR-7M for larch@yhetil.org; Fri, 24 Sep 2021 08:27:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTkIA-0002iC-JR for guix-patches@gnu.org; Fri, 24 Sep 2021 08:27:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45361) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTkI9-0000fG-LM for guix-patches@gnu.org; Fri, 24 Sep 2021 08:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTkI9-0000gQ-I9 for guix-patches@gnu.org; Fri, 24 Sep 2021 08:27:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50274] [PATCH] guix: git: Adds feature to download git repository to the store. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Sep 2021 12:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50274 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: jgart Cc: Julien Lepiller , 50274@debbugs.gnu.org Received: via spool by 50274-submit@debbugs.gnu.org id=B50274.16324863832566 (code B ref 50274); Fri, 24 Sep 2021 12:27:01 +0000 Received: (at 50274) by debbugs.gnu.org; 24 Sep 2021 12:26:23 +0000 Received: from localhost ([127.0.0.1]:56907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTkHX-0000fJ-C8 for submit@debbugs.gnu.org; Fri, 24 Sep 2021 08:26:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTkHU-0000f2-PZ for 50274@debbugs.gnu.org; Fri, 24 Sep 2021 08:26:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49042) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTkHM-0000ES-NR; Fri, 24 Sep 2021 08:26:13 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60462 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTkH1-0007O0-Cu; Fri, 24 Sep 2021 08:26:10 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210830163918.19419-1-jgart@dismail.de> Date: Fri, 24 Sep 2021 14:25:49 +0200 In-Reply-To: <20210830163918.19419-1-jgart@dismail.de> (jgart@dismail.de's message of "Mon, 30 Aug 2021 12:39:19 -0400") Message-ID: <87y27mma7m.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632486432; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=tm647kwOToFrgOKQHfYWDhr706gS/1zS4BSqej/D/pQ=; b=Ch42Ks0oz4u4ukQqbN17Q9SU/p+SLBB81X1dRVlxZN8qC44z62zWOyTxwhlK/gkX5ZXtmG 5KnLT/f99xemYnN5AFZMSFP+jqEAFK+aAD9akdjt66sQ1V2V9malEMobzzeQstkolJQ2sc kElqauJJKSYBCPmCw6x0YY8e9fOxCj2u8O0vFtTxh19nVxs+BqgrGN8s1ILp4n30hSiDPG WX3pJ/GC7KXXkwCDB8RFUhU/VkBCs68N7Q9hiPRusItWxig+MFGCKkMdMQnhR/x+t6YrvN TWR5uIdstK71WVEMqIf3FV0+zvkyuQ3q8RmC0WSoqrh1vs0EINqmdYjv0CM6Gw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632486432; a=rsa-sha256; cv=none; b=crh+JqBgKxiS+Qd4uSlEeWd5JdH9enRbsG5f6msDbinXwT5gJvv1/1CQHg7uW5IqxmYJ07 4mehXQbEWDCfBg+qLoX+1m3PDz8p3J72hW5t91h4P/zPiFpaxkB8kTfwLVQx2GNBARY77f spO3XJIJViLUB5O0LzuFDDNIdiSX5M/96i41FJaD2o8Lcm+O084c47zmd1Rn5O7sdbdoLq 4tqneTcr86yaBXg7pyDRgIinfZ95TvSDsI11eqX3A8cBOherAvPFlgiPVO/mlY61RHoR3x n+Ky4tkLJx5xyCjmE7wgCq3XqJhLVeXC5eppYLGnjcSh1dtVqOwMvZeVKesMCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.89 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 24FDB8FAD X-Spam-Score: -2.89 X-Migadu-Scanner: scn0.migadu.com X-TUID: M3frtHEbGQC5 Hi Julien & jgart, jgart skribis: > From: Julien Lepiller > > * guix/git.scm (download-git-to-store): Download Git repository from > URL at COMMIT to STORE, either under NAME or URL's basename if omitted. > Write progress reports to LOG. RECURSIVE? has the same effect as the > same-named parameter of 'git-fetch'. > > * guix/scripts/download.scm (download-git-to-store*): Adds cli option. > Examples: > guix download --git-commit=3Dv0.1.1 github.com/anaseto/gruid-tcell > guix download -c v0.1.1 https://github.com/anaseto/gruid-tcell Very useful! > +(define* (download-git-to-store store url commit > + #:optional (name (basename url)) > + #:key (log (current-error-port)) recursi= ve?) > + "Download Git repository from URL at COMMIT to STORE, either under NAM= E or > +URL's basename if omitted. Write progress reports to LOG. RECURSIVE? h= as the > +same effect as the same-named parameter of 'git-fetch'." Can we use =E2=80=98latest-repository-commit=E2=80=99 instead? The differe= nce is that it=E2=80=99ll populate ~/.cache/guix/checkouts, but I think that=E2=80=99s = fine. OTOH, if we want to make it easier to support other VCSes, we can choose to not use (guix git) at all and instead use =E2=80=98git-fetch=E2=80=99 in= (guix git-download), =E2=80=98hg-fetch=E2=80=99 in (guix hg-download), etc. This= code would go to (guix scripts hash). WDYT? [...] > + (option '(#\c "git-commit") #t #f > + (lambda (opt name arg result) > + (alist-cons 'commit arg result))) For consistency with package transformation options, I=E2=80=99d call it =E2=80=98--commit=E2=80=99. This option would still apply if/when other VC= Ses are supported. This would also need an update of the manual. Thanks, Ludo=E2=80=99.