From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OJ3XB0YYVmFgJAEAgWs5BA (envelope-from ) for ; Thu, 30 Sep 2021 22:04:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sDBsA0YYVmF7SAAAbx9fmQ (envelope-from ) for ; Thu, 30 Sep 2021 20:04:22 +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 6427234198 for ; Thu, 30 Sep 2021 22:04:21 +0200 (CEST) Received: from localhost ([::1]:36440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mW2Hy-00054j-P8 for larch@yhetil.org; Thu, 30 Sep 2021 16:04:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mW2Hi-00053m-Ut for guix-patches@gnu.org; Thu, 30 Sep 2021 16:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mW2Hi-0005FB-19 for guix-patches@gnu.org; Thu, 30 Sep 2021 16:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mW2Hh-0004ax-TG for guix-patches@gnu.org; Thu, 30 Sep 2021 16:04: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: Thu, 30 Sep 2021 20:04: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: Sarah Morgensen Cc: Julien Lepiller , jgart , 50274@debbugs.gnu.org Received: via spool by 50274-submit@debbugs.gnu.org id=B50274.163303220217612 (code B ref 50274); Thu, 30 Sep 2021 20:04:01 +0000 Received: (at 50274) by debbugs.gnu.org; 30 Sep 2021 20:03:22 +0000 Received: from localhost ([127.0.0.1]:54088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mW2H3-0004Zy-Qq for submit@debbugs.gnu.org; Thu, 30 Sep 2021 16:03:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mW2H0-0004Zi-OO for 50274@debbugs.gnu.org; Thu, 30 Sep 2021 16:03:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57936) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mW2Gr-0004Wc-4K; Thu, 30 Sep 2021 16:03:12 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36432 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mW2Gq-0007GW-5C; Thu, 30 Sep 2021 16:03:08 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210830163918.19419-1-jgart@dismail.de> <87y27mma7m.fsf@gnu.org> <868rzjvope.fsf@mgsn.dev> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 =?UTF-8?Q?Vend=C3=A9miaire?= an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 30 Sep 2021 22:03:05 +0200 In-Reply-To: <868rzjvope.fsf@mgsn.dev> (Sarah Morgensen's message of "Sat, 25 Sep 2021 23:24:45 -0700") Message-ID: <871r554yrq.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=1633032261; 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=KxKO7mtxjaofYAgoFtRf3hOy11Aao8aQKrL4xwzzqqc=; b=XP5JOjRA5vVR8S75/TEAifa8Smc+RnQjd1Q+mR3jNazTg0N+icWzVOwVzLykgtCyLK+/tq qGhoeqN6mp5h6MLaCYx/qMal6D/OwJ2bRi4ehy7PBuZjca5ccawdNsZFw/pxsT9NuT+UAr 7nl9vRB7ohlUXaEWIf4Sq87w9Scn++Nk8qbhEk/38mEISmJcXEC6UIclbxu10do52xjc91 NrTHYCgDQMSIA9nBxWrybf8mL83SHNkyX9IrkivyfkN2PmcDyBxEDRbQF0ysgqIHR17CLQ K8SIFs77d3O9GlrUgNE12VnF92jB6YW2cl8+Ox5oVPx7YoH9a6F3n6b009eg8Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633032261; a=rsa-sha256; cv=none; b=EMbO5StaBdM9p361URVq3esVlXSHMvQlELg281imATm7tOAI0ENN5R6FYfdBPHJYXv/7j+ apIXWPvimCuaQITg6DHgVZ8Nqpi3m8W6E+cNE6qva5rctrHgBhG8AZZ/YDMwGcbOZ6OkJi FYjhhJsca1ZZWdUK2dtvNbWG4fwV7ekZkkk5ycKszX6ha9KPFHxnkHAkhDI7q4hbsMnx69 +WtkdRzQZF/QELyjPW/X/Y+uvgcuqWyvx5HVdyizk2UVb+mroJ6++0M1Pb6Blps6n/2tNv xTAZ3jvYpvh5i3Zbpl+ZunkBi0PDxg1YH1AXh13CzneKNYn6HSsx6vMyTfl9TQ== 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: -3.52 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: 6427234198 X-Spam-Score: -3.52 X-Migadu-Scanner: scn0.migadu.com X-TUID: zEe6OiWO6ScB Hi, Sarah Morgensen skribis: > Ludovic Court=C3=A8s writes: > >>> +(define* (download-git-to-store store url commit >>> + #:optional (name (basename url)) >>> + #:key (log (current-error-port)) recur= sive?) >>> + "Download Git repository from URL at COMMIT to STORE, either under N= AME or >>> +URL's basename if omitted. Write progress reports to LOG. RECURSIVE?= has the >>> +same effect as the same-named parameter of 'git-fetch'." >> >> Can we use =E2=80=98latest-repository-commit=E2=80=99 instead? The diff= erence 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. T= his code would >> go to (guix scripts hash). >> >> WDYT? > > Would using 'git-fetch' mean that it's already in the store (and > therefore won't be redownloaded) when it's subsequently used in a > source? That would be even better than latest-repository-commit! Yes, you=E2=80=99re right. > (Presumably --with-commit and friends also use 'git-fetch'?) No, they use =E2=80=98latest-repository-commit=E2=80=99 (via = ) because it=E2=80=99s a case where you can=E2=80=99t use an because the con= tent hash is not known in advance (and the commit is also unknown when you use =E2=80=98--with-branch=E2=80=99). Ludo=E2=80=99.