From unknown Fri Jun 20 07:17:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#61910 <61910@debbugs.gnu.org> To: bug#61910 <61910@debbugs.gnu.org> Subject: Status: [PATCH] git-download: Download a bare Git repository from SWH. Reply-To: bug#61910 <61910@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:17:34 +0000 retitle 61910 [PATCH] git-download: Download a bare Git repository from SWH. reassign 61910 guix-patches submitter 61910 Ludovic Court=C3=A8s severity 61910 normal tag 61910 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 04:12:54 2023 Received: (at submit) by debbugs.gnu.org; 2 Mar 2023 09:12:54 +0000 Received: from localhost ([127.0.0.1]:55742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXezd-0007Fr-P7 for submit@debbugs.gnu.org; Thu, 02 Mar 2023 04:12:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:47690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXezZ-0007Fh-6U for submit@debbugs.gnu.org; Thu, 02 Mar 2023 04:12:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXezX-0003zK-SU for guix-patches@gnu.org; Thu, 02 Mar 2023 04:12:48 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXezX-0005qV-JF; Thu, 02 Mar 2023 04:12:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=nPqoIDN3JTSuAZRRBGKSieBvCFxWrYofm7kTqFhTJ/Y=; b=M6ykyJsYmR1fvq qPQOem7HISfN9oNkFcwxbZ+bBqlo00I1elwf55DKeb1pz4UtKrW6UbJE92vpaJ1tjIvDa6BG+WoHe FJpSRN1ficYwEHgwxCtFxaiZEnbDOJX/I0WJm1R6p9Jv7L6ozOl6ftbzULtGmeiS7ZG0WgKMiotjG /V4o79Ii3FCjSK9cN2kO1yS5CWw8+Coib1UyfP+2CN1CbfoeCgUk8FplOnc76rRDusLUf3ikDvoeQ U6wmpWUlipXBnns0o3zJGsMC9vJ7G/LuBu+Ennb78naXSJjvUL4gMQpTDEHL4ebVrjHj5MXI0/NW0 WmzKOiGPg3f0BQ9I1VBg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXezX-0005RO-69; Thu, 02 Mar 2023 04:12:47 -0500 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH] git-download: Download a bare Git repository from SWH. Date: Thu, 2 Mar 2023 10:12:33 +0100 Message-Id: <20230302091233.28226-1-ludo@gnu.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Debbugs-Cc: Simon Tournier , Valentin Lorentz Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Fixes a bug whereby CR/LF convention would not be applied on Git repositories retrieved from SWH: https://sympa.inria.fr/sympa/arc/swh-devel/2023-03/msg00000.html Reported by Simon Tournier . Suggested by Valentin Lorentz . * guix/git-download.scm (git-fetch)[build]: Pass #:archive-type to 'swh-download' and invoke "git clone" on the result. --- guix/git-download.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) Hi there! I just saw the discussion between Simon and Valentin (Cc’d) and realized this could easily be fixed on our side because (guix swh) is already equipped to fetch bare Git repositories. To test it, comment out the ‘git-fetch’ and ‘download-nar’ calls in (guix git-download) and run, say: ./pre-inst-env guix build -S guile-bash --check I don’t know of a repository that has this CRLF problem though, so we should check that it actually works as advertised on such a repo. Thanks, Ludo’. diff --git a/guix/git-download.scm b/guix/git-download.scm index a1566bed4d..9f57b4170d 100644 --- a/guix/git-download.scm +++ b/guix/git-download.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2014-2021, 2023 Ludovic Courtès ;;; Copyright © 2017 Mathieu Lirzin ;;; Copyright © 2017 Christopher Baines ;;; Copyright © 2020 Jakub Kądziołka @@ -162,8 +162,17 @@ (define recursive? (parameterize ((%verify-swh-certificate? #f)) (format (current-error-port) "Trying to download from Software Heritage...~%") + + ;; Fetch the source as a bare Git repository (rather + ;; than 'flat') so Git can post-process it in the usual + ;; way, for instance to perform CR/LF conversion. (swh-download (getenv "git url") (getenv "git commit") - #$output)))))))) + "git-repo" + #:archive-type 'git-bare) + (invoke #+(file-append git "/bin/git") + "clone" "git-repo" #$output) + (delete-file-recursively + (string-append #$output "/.git"))))))))) (mlet %store-monad ((guile (package->derivation guile system))) (gexp->derivation (or name "git-checkout") build base-commit: ff5fbcc19bce6e94ead0cc79b27ae8ed0307463d -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 05:30:38 2023 Received: (at 61910) by debbugs.gnu.org; 2 Mar 2023 10:30:38 +0000 Received: from localhost ([127.0.0.1]:55886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXgCr-0000qn-D3 for submit@debbugs.gnu.org; Thu, 02 Mar 2023 05:30:37 -0500 Received: from mail-wr1-f42.google.com ([209.85.221.42]:36474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXgCq-0000qZ-3n for 61910@debbugs.gnu.org; Thu, 02 Mar 2023 05:30:36 -0500 Received: by mail-wr1-f42.google.com with SMTP id l25so16031460wrb.3 for <61910@debbugs.gnu.org>; Thu, 02 Mar 2023 02:30:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677753030; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=Lx7lUzdo9CScRjn/bTxe9tCAEPi0fopCNYCTtoqg3II=; b=lKiR2mxZreh1O2R7oTh6HzwwWqYs5V+fZJypCNfVzCyRuXBfUOKz3Y33UVsv7f3EFF lDJD5KiVxtCSfhL5+wDHLSqzy0e+Vl0u0ZUsVtHR4H0wkUnKYonkR2QnPog1N6ppjI/c 74AuFAPsULLjPLN/yhCBseQ/f27jlMfV0yOk62OE5vOq7htDGJoSqE6GgEQ3JobxRDqC VwlR5SblQb1F82dXrrUQvymVdtFeVxElYwpSQqkXW0oIIidGTrKa8nZTe0gyFAIcz7ZN oHN9lZ6vUjO2vtN087l0Vt2vZ5f3Kjh7LJHpYOR02cLL6VTv1W0HoKilENYtco8aJNlW ZPCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677753030; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Lx7lUzdo9CScRjn/bTxe9tCAEPi0fopCNYCTtoqg3II=; b=R9fMKs5OS782PxZ0XJIBZmLxWOSQB5nj7yEzzBHCgGHsQqLIGgV5vMJOHyLDeBwFkD APMBkPe9nNLJPojqYQLvC5es0AcW+PxoSzLkdeek1LU3SUGWILAjkaeK6LvIDtssUDg8 ajJjifk67XhzHvwsCLAO54dDy/hK5q3MH/TuUWRHNOcCLPfxc8H4lLAkfvvnyBVPAFnG j66VNlCodUqu+IKsh7M6HFSMbfiI3JnBjiNhDYxoTuERS//Nh1tssHSsIi23+sRCluK+ 6+M7GBl1ArrkUfJUVUyrWkrFRYHvpP977lTt7jNQXSNopNZhZapeMomF4tiW2qgGk0bw NXOQ== X-Gm-Message-State: AO0yUKWWiy32K6gT1ZpFRMCfF0Zmip5s1puXnYVo2/cdgIEYseukZuBd rzrDpt095djmrpLFz4JU9G8= X-Google-Smtp-Source: AK7set9Lm80hWZNF+zozQqiQ3uWXl2f7RpZVpbVSQ9hejZAbps/tNMvomoX77jkxseAhwWn/nn6CFQ== X-Received: by 2002:a05:6000:109:b0:2c7:1210:fe61 with SMTP id o9-20020a056000010900b002c71210fe61mr6420624wrx.3.1677753029850; Thu, 02 Mar 2023 02:30:29 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id l8-20020adff488000000b002c557f82e27sm15003301wro.99.2023.03.02.02.30.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 02:30:29 -0800 (PST) From: Simon Tournier To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61910: [PATCH] git-download: Download a bare Git repository from SWH. References: <20230302091233.28226-1-ludo@gnu.org> Date: Thu, 02 Mar 2023 11:30:26 +0100 In-Reply-To: <20230302091233.28226-1-ludo@gnu.org> ("Ludovic =?utf-8?Q?Cou?= =?utf-8?Q?rt=C3=A8s=22's?= message of "Thu, 2 Mar 2023 10:12:33 +0100") Message-ID: <877cvzfnst.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61910 Cc: Simon Tournier , 61910@debbugs.gnu.org, Valentin Lorentz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On jeu., 02 mars 2023 at 10:12, Ludovic Court=C3=A8s wrote: > I don=E2=80=99t know of a repository that has this CRLF problem though, so > we should check that it actually works as advertised on such a repo. Here my test: + disable network and only allow archive.softwareheritage.org, + run, ./pre-inst-env guix build -L /tmp/pkg hidapi@0.9.0 -S --check where /tmp/pkg.test.scm is just the old version of hidapi. The patch fixes the discrepancy but it seems more work on SWH side and this will not scale, as Valentin reported in [1]. Since it is a corner case, it would be best if first let try with the flat method and if it fails, let use git-bare. Well, it would mean add some integrity check in the last resort attempt. WDYT? 1: --8<---------------cut here---------------start------------->8--- $ cat /tmp/pkg/test.scm (define-module (test) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (gnu packages libusb) ) (define-public hidapi-0.9 (package (inherit hidapi) (name "hidapi") (version "0.9.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/libusb/hidapi") (commit (string-append "hidapi-" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1p4g8lgwj4rki6lbn5l6rvwj0xlbn1xfh4d255bg5pvgczmwmc4i")))))) $ ./pre-inst-env guix build -L /tmp/pkg hidapi@0.9.0 -S --check The following derivation will be built: /gnu/store/cg34yy4pd7b246qpi946x5lhcg1x80sw-hidapi-0.9.0-checkout.drv building /gnu/store/cg34yy4pd7b246qpi946x5lhcg1x80sw-hidapi-0.9.0-checkout.= drv... guile: warning: failed to install locale environment variable `PATH' set to `/gnu/store/0c1yfbxyv877mlgychfgvmk5ha2j= qh52-gzip-1.10/bin:/gnu/store/8z1q7vjxylm6l4ibsywd4h6m6jv6zqm4-tar-1.34/bin' hint: Using 'master' as the name for the initial branch. This default branc= h name hint: is subject to change. To configure the initial branch name to use in = all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this comman= d: hint: hint: git branch -m Initialized empty Git repository in /gnu/store/n6rvypb3z386v0ml6n0xyga2x4q9= ij58-hidapi-0.9.0-checkout/.git/ fatal: unable to access 'https://github.com/libusb/hidapi/': Could not reso= lve host: github.com Failed to do a shallow fetch; retrying a full fetch... fatal: unable to access 'https://github.com/libusb/hidapi/': Could not reso= lve host: github.com git-fetch: '/gnu/store/5qcj54m8smhp9gd0i8zq1y4c08cmrfii-git-minimal-2.39.1/= bin/git fetch origin' failed with exit code 128 Trying content-addressed mirror at berlin.guix.gnu.org... Trying content-addressed mirror at berlin.guix.gnu.org... Trying to download from Software Heritage... SWH: found revision 7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f with directory= at 'https://archive.softwareheritage.org/api/1/directory/c95078f3645abc050= 536d3aaf76cb5fb6eb6b288/' SWH vault: requested bundle cooking, waiting for completion... SWH vault: Processing... 1334 objects processed Over 403 remaining SWH vault: Processing... 1484 objects processed Over 301 remaining SWH vault: Processing... 1603 objects processed Over 212 remaining SWH vault: Processing... 1712 objects processed Over 115 remaining swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/HEAD swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/branches/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/config swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/description swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/hooks/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/info/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/info/exclude swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/info/refs swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/info/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/info/packs swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/pack/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/pack/pack-f1= 0e443dcb1d90e42a4fb9519c0fc5429ba49ba9.idx swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/pack/pack-f1= 0e443dcb1d90e42a4fb9519c0fc5429ba49ba9.pack swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/refs/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/refs/heads/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/refs/heads/master swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/refs/tags/ Cloning into '/gnu/store/n6rvypb3z386v0ml6n0xyga2x4q9ij58-hidapi-0.9.0-chec= kout'... done. successfully built /gnu/store/cg34yy4pd7b246qpi946x5lhcg1x80sw-hidapi-0.9.0= -checkout.drv successfully built /gnu/store/cg34yy4pd7b246qpi946x5lhcg1x80sw-hidapi-0.9.0= -checkout.drv /gnu/store/n6rvypb3z386v0ml6n0xyga2x4q9ij58-hidapi-0.9.0-checkout --8<---------------cut here---------------end--------------->8--- Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 07:06:14 2023 Received: (at 61910) by debbugs.gnu.org; 2 Mar 2023 12:06:14 +0000 Received: from localhost ([127.0.0.1]:56019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXhhN-0003XV-Rk for submit@debbugs.gnu.org; Thu, 02 Mar 2023 07:06:14 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:38628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXhhL-0003XI-CW for 61910@debbugs.gnu.org; Thu, 02 Mar 2023 07:06:12 -0500 Received: by mail-wr1-f49.google.com with SMTP id h11so4546324wrm.5 for <61910@debbugs.gnu.org>; Thu, 02 Mar 2023 04:06:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677758765; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=WcSl1iPwUPF9FT3EMTTN5WMId3/nxLPQ3gcvUAhUyy0=; b=Npp/0QYRyFGE4QU2M1MbD/Z2GPpuu2VYmQMHpgji5HgBgACGqscv+XrvE7RNLwZMg/ 0Sn2n2FDkZQtoxPOgfcCxFmzb/WQMTqYI97mQo4e63arLUcYlBLd4ZUGzTVbCd3thE9w JgMi6pUSFgeXAiUqZFonnauzZHoWmIGMrvMfT0Ba1IlVFGb9eOwEWPLaFmdx/fVBR7oX CQ5uwZM2SJ+i61CQqcBhscMoOFo33wFCcnJbP0B72lJExxXxzaR0k1cQVKFpPyxCmfNF 9tQZjFkA9PqOiPMeADUd629gpa4/PmERM5P9doqL4Gw7laAlNEn8TqeGvDuY0uJCAJ7h 8WiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677758765; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WcSl1iPwUPF9FT3EMTTN5WMId3/nxLPQ3gcvUAhUyy0=; b=LBeWzRdeF0g+6b7WXkxowUTCGcYiLdcs+QwHAqjGxOEk2z/WUesMDa3HPeayntejuD Pexn5QIxh5a9TwVYEQnnyDQkHW+xBV8y5o+2SHurlAFm98et16HhsAmNrQ9gL87EnTKL qUxYjDT1BzTByVQw2ONShVs5JlpGDXlZys3j+pK5ISdsjFXZ/quvnIdm/EiWA5nlOvSQ c2NU5N+AC4xDOxPyPj2ERknI1Csz9fGzGt7sehNJx+haIAB35p/EDgjWKNw4jbHqUBWx HF44Oo8WAWuwmBCyzJgxRZl+lFm8ty9h0fmGjPKSaQoJ4Ie5DBerrP8TAm39Ww/F3kOD 2jUA== X-Gm-Message-State: AO0yUKV80bmHTY09iuvcduaC39Y0ojTPDX2eyaY7yRrtG17ev2Uhin5l f7gMHpn+fAEGDkK4MPmqXWZcS9E4XYQ= X-Google-Smtp-Source: AK7set8ZiQp9PvSQTJBGHtxGRlToajKx90Z5V3tCI1btE7L8cgNBfZiyy848w5zwBNrCORbHCrD9FA== X-Received: by 2002:adf:dbc6:0:b0:2c7:1755:30ad with SMTP id e6-20020adfdbc6000000b002c7175530admr6360480wrj.2.1677758765146; Thu, 02 Mar 2023 04:06:05 -0800 (PST) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id m1-20020a05600c4f4100b003e01493b136sm3005006wmq.43.2023.03.02.04.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 04:06:04 -0800 (PST) From: Simon Tournier To: 61910@debbugs.gnu.org Subject: [PATCH v2] git-download: Apply CR/LF to Git repository from SWH. Date: Thu, 2 Mar 2023 13:05:46 +0100 Message-Id: <20230302120546.1074630-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61910 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From: Ludovic Courtès Fixes a bug whereby CR/LF convention would not be applied on Git repositories retrieved from SWH: https://sympa.inria.fr/sympa/arc/swh-devel/2023-03/msg00000.html Reported by Simon Tournier . Suggested by Valentin Lorentz . Co-authored by Simon Tournier . * guix/git-download.scm (git-fetch)[build]: Add Git operations conditioned by .gitattributes on the result from SWH. --- guix/git-download.scm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) Hi, This uses 'flat' as previously but applies some Git commands for fixing CR/LF when .gitattributes is present or not. It works on the example hidapi. I have not tried for other examples. WDYT? Cheers, simon diff --git a/guix/git-download.scm b/guix/git-download.scm index a1566bed4d..be0b13615c 100644 --- a/guix/git-download.scm +++ b/guix/git-download.scm @@ -1,8 +1,9 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2014-2021, 2023 Ludovic Courtès ;;; Copyright © 2017 Mathieu Lirzin ;;; Copyright © 2017 Christopher Baines ;;; Copyright © 2020 Jakub Kądziołka +;;; Copyright © 2023 Simon Tournier ;;; ;;; This file is part of GNU Guix. ;;; @@ -162,8 +163,27 @@ (define recursive? (parameterize ((%verify-swh-certificate? #f)) (format (current-error-port) "Trying to download from Software Heritage...~%") + (swh-download (getenv "git url") (getenv "git commit") - #$output)))))))) + #$output) + ;; Perform CR/LF conversion if specificied by .gitattributes + (when (find-files "." ".gitattributes") + (invoke #+(file-append git "/bin/git") "-C" #$output + "init") + (invoke #+(file-append git "/bin/git") "-C" #$output + "config" "--local" "user.email" "you@example.org") + (invoke #+(file-append git "/bin/git") "-C" #$output + "config" "--local" "user.name" "Your Name") + (invoke #+(file-append git "/bin/git") "-C" #$output + "add" ".") + (invoke #+(file-append git "/bin/git") "-C" #$output + "commit" "-am" "'init'") + (invoke #+(file-append git "/bin/git") "-C" #$output + "read-tree" "--empty") + (invoke #+(file-append git "/bin/git") "-C" #$output + "reset" "--hard") + (delete-file-recursively + (string-append #$output "/.git")))))))))) (mlet %store-monad ((guile (package->derivation guile system))) (gexp->derivation (or name "git-checkout") build base-commit: af95f2d8f98eb2c8c64954bb2fd0b70838899174 -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 08:15:28 2023 Received: (at 61910) by debbugs.gnu.org; 2 Mar 2023 13:15:28 +0000 Received: from localhost ([127.0.0.1]:56146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXimN-000307-Kk for submit@debbugs.gnu.org; Thu, 02 Mar 2023 08:15:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXimL-0002g6-Sz for 61910@debbugs.gnu.org; Thu, 02 Mar 2023 08:15:26 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXimG-0001BL-Cg; Thu, 02 Mar 2023 08:15:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=umZEIRh3nHY9RZmeJBYfh3UmbG3Q9YON/qe2X4jk1E4=; b=diz9dr8PoczenqwNQk55 QFtTsSw2YMBdpcm9P7xDPtNg+Emcbb2S1COjAjsGZv1pLmHewAa6QB9QKHuSaOcU0wFeu5MnPGai7 VdxUCRNoNcYbZT5SO8SOxxzFmrCFd3Rsy3j7bgj4jCW7+IYBgmDmEEpGZljQyLK3p2ethoUFRPAs7 epqcszTpFGM1bsrH7CBMAmIrWJA53wyfSKnnjCGrWHF6rjuPSQEaKzqmr1OFwkZgebQb99fhpFLHA 7hpmkN7EvcGEPx7CoJ3dK2014Jt1ebIrrkf/p7yJx4ZzGd3oC3RAse1Kwb4v5wjDuOrXmYI6cPxzU DvtV8BnJiUvaMA==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXim3-0002wJ-Q4; Thu, 02 Mar 2023 08:15:20 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: bug#61910: [PATCH] git-download: Download a bare Git repository from SWH. References: <20230302091233.28226-1-ludo@gnu.org> <20230302120546.1074630-1-zimon.toutoune@gmail.com> Date: Thu, 02 Mar 2023 14:15:05 +0100 In-Reply-To: <20230302120546.1074630-1-zimon.toutoune@gmail.com> (Simon Tournier's message of "Thu, 2 Mar 2023 13:05:46 +0100") Message-ID: <87cz5r5m7a.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61910 Cc: 61910@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! Simon Tournier skribis: [...] > (swh-download (getenv "git url") (getenv "git com= mit") > - #$output)))))))) > + #$output) > + ;; Perform CR/LF conversion if specificied by .gi= tattributes > + (when (find-files "." ".gitattributes") > + (invoke #+(file-append git "/bin/git") "-C" #$o= utput > + "init") > + (invoke #+(file-append git "/bin/git") "-C" #$o= utput > + "config" "--local" "user.email" "you@ex= ample.org") > + (invoke #+(file-append git "/bin/git") "-C" #$o= utput > + "config" "--local" "user.name" "Your Na= me") > + (invoke #+(file-append git "/bin/git") "-C" #$o= utput > + "add" ".") > + (invoke #+(file-append git "/bin/git") "-C" #$o= utput > + "commit" "-am" "'init'") > + (invoke #+(file-append git "/bin/git") "-C" #$o= utput > + "read-tree" "--empty") > + (invoke #+(file-append git "/bin/git") "-C" #$o= utput > + "reset" "--hard") > + (delete-file-recursively > + (string-append #$output "/.git")))))))))) This is much better than fetching the whole repo, well done! Should we replace (find-files =E2=80=A6) with (file-exists? ".gitattributes= ")? I wonder if we could achieve the same without creating a repo just to delete it afterwards, either by invoking a low-level =E2=80=98git=E2=80=99 = command it if exists, or using Guile-Git, or doing it ourselves in Scheme. WDYT? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 08:51:17 2023 Received: (at 61910) by debbugs.gnu.org; 2 Mar 2023 13:51:17 +0000 Received: from localhost ([127.0.0.1]:56197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXjL2-00054D-M4 for submit@debbugs.gnu.org; Thu, 02 Mar 2023 08:51:17 -0500 Received: from mail-lj1-f177.google.com ([209.85.208.177]:35726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXjL0-00053y-0g for 61910@debbugs.gnu.org; Thu, 02 Mar 2023 08:51:14 -0500 Received: by mail-lj1-f177.google.com with SMTP id h9so17693969ljq.2 for <61910@debbugs.gnu.org>; Thu, 02 Mar 2023 05:51:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677765068; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SA6dhATReQE6pGcBtDIf9SUnYnhUhXpI0QmX00mJcWc=; b=Bevzp+nEuuyNxkW7yDYro3WF6tNiIMZ6F9B/wEtKnj82hvVwGCTbERrDHXMdJGT59z r9EO9oUJfxwgSA+6E5hm4xeARGtmVZXYSD+euUmpCJbYkgJwIY3ldeb5gy0sYW/e2rXO xvzxc1Q577xm5pwqpApjjNOQWPf85HQA9sZV+3UH6zdXfpwJjgkbxvKDL/wp8cDyCwuX PVc6HF9N+kz7AH4kVKWIN2xgtVbtbWmHh3sffrjiP1AmBWhDnzylLz7vkBhadtFSXUfi G9B2eGear9rwrWtNn3tGbL9o1/oAH38sqQW+pBn+ZzCaIt/6JrUiJeOBK7ITvyft8EfY 9FSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677765068; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SA6dhATReQE6pGcBtDIf9SUnYnhUhXpI0QmX00mJcWc=; b=LWHping5Ye2ldVhDiCrKoMIggRPCrHdMYz3HlCDKFBmAJd45TPM2JCOEu6O+OV51qh 0ERkpu+ED0lSQPwgkVAKiag3eGwTqpM3ls4x+US7Pei26IHCnq9syNyawSqB8ds2uk+d L1a649h3z4smDt8E+oEICwK/SwCD2MOl11ZKLPI7gtR6FwMCacewO7VrPJHao9A3Ahej pGCWkpiYFYOFa2S61xkAlUDXzZW1tb/8tg6/G3QZIEb+RgSSlSZk7OKRpUUMC1LW3jq9 GWflgug/gwFVIzJ4vOpzXyDAlH3ddz8TxrFFl3yPJh0IZt7n9Z2rK6TtjUVDcYcprPid KOhQ== X-Gm-Message-State: AO0yUKWlDYMgB/nSePkdzoKDB3YvTU/qVbVP6UFUXp5EzuTxTLFRkSVy OhSv/i/Dxw9Bl7FoegEkmhtK7ZpfquT+TIRiIr4= X-Google-Smtp-Source: AK7set8k43DNCD3R8xUcCXOuWR4Yt/xfBCDCj78G2UNXLC05YeFpnURO/4V8t6LP/o44qyUVXTrSOmzr8frCNuyxdi4= X-Received: by 2002:a2e:b74c:0:b0:295:b2f0:a857 with SMTP id k12-20020a2eb74c000000b00295b2f0a857mr3336050ljo.10.1677765067653; Thu, 02 Mar 2023 05:51:07 -0800 (PST) MIME-Version: 1.0 References: <20230302091233.28226-1-ludo@gnu.org> <20230302120546.1074630-1-zimon.toutoune@gmail.com> <87cz5r5m7a.fsf_-_@gnu.org> In-Reply-To: <87cz5r5m7a.fsf_-_@gnu.org> From: Simon Tournier Date: Thu, 2 Mar 2023 14:50:56 +0100 Message-ID: Subject: Re: bug#61910: [PATCH] git-download: Download a bare Git repository from SWH. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61910 Cc: 61910@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Re, On Thu, 2 Mar 2023 at 14:15, Ludovic Court=C3=A8s wrote: > Should we replace (find-files =E2=80=A6) with (file-exists? ".gitattribut= es")? Damned! It was what I was looking for. :-) > I wonder if we could achieve the same without creating a repo just to > delete it afterwards, either by invoking a low-level =E2=80=98git=E2=80= =99 command it if > exists, or using Guile-Git, or doing it ourselves in Scheme. Doing it ourselves in Scheme, I do not know. I guess it would be hard. Basically, it is not clear for me what we would have to implement. For instance, we get the ("normalized") content fetched from SWH , so we have: --8<---------------cut here---------------start------------->8--- hidapi.swh/testgui/test.cpp: C++ source, ASCII text hidapi.swh/testgui/testgui.sln: UTF-8 Unicode (with BOM) text hidapi.swh/testgui/testgui.vcproj: XML 1.0 document, ASCII text --8<---------------cut here---------------end--------------->8--- and we need: --8<---------------cut here---------------start------------->8--- hidapi.guix/testgui/test.cpp: C++ source, ASCII text hidapi.guix/testgui/testgui.sln: UTF-8 Unicode (with BOM) text, with CRLF line terminators hidapi.guix/testgui/testgui.vcproj: XML 1.0 document, ASCII text, with CRLF line terminators --8<---------------cut here---------------end--------------->8--- So the question is how to know which files require CRLF and which not? >From my understanding, this information is provided by: --8<---------------cut here---------------start------------->8--- $ cat hidapi.guix/.gitattributes * text=3Dauto *.sln text eol=3Dcrlf *.vcproj text eol=3Dcrlf bootstrap text eol=3Dlf configure.ac text eol=3Dlf --8<---------------cut here---------------end--------------->8--- As zack pointed yesterday, well that what I understood or misunderstood, it is related to "smudge" filters [1]. 1: About Guile-Git, probably the same as you answered me earlier today. ;-) it's just that it was easier to implement and yeah, shallow clones are nice we don't need tight integration in this context, so less = of an incentive to use Guile-Git (it's very different from the channel code from that perspective) Kidding aside, I agree that relying on Guile-Git would mean being less "fragile". Hum, somehow this asks about the size of the binary seed for bootstrapping. About low-level 'git' command, maybe the same could be achieved without "git init" + "git add" + "git commit". Well, my gitology is not enough skilled. :-) Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 14:48:20 2023 Received: (at 61910) by debbugs.gnu.org; 2 Mar 2023 19:48:21 +0000 Received: from localhost ([127.0.0.1]:58420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXoua-0005Vm-BQ for submit@debbugs.gnu.org; Thu, 02 Mar 2023 14:48:20 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:41514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXouY-0005UV-6R for 61910@debbugs.gnu.org; Thu, 02 Mar 2023 14:48:18 -0500 Received: by mail-wr1-f53.google.com with SMTP id f11so217753wrv.8 for <61910@debbugs.gnu.org>; Thu, 02 Mar 2023 11:48:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677786492; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=sPM4hKCJz6N9FfvFWxNFvNyLpwk0EfbNxxhdXNJPU2c=; b=FdS0gVal1Cb7g6VzUErw6YxOxkjyyr9LheBfwpUcy725TmzYRx8f95movqYWIso5Pn T83YvFpJoZUZNwOzmwVj4VgIxpVn9ZHeRNb2HiIn1W8xSW7YCCtY+tlwF0BKKuTMXtWd AAXIQPP2yXpqknSRWvVLIPLsZnlqY/HM9liwea8HA/JgRwp77GV3ef2kj02Qbm/h2Vk2 33knxKknhV0mGSre1tUDiRveS+z62H80G72phtbtIZRSenfdBut0Im6kG9oHHCCUYfva ONoVhIn4Nuk0TDHRvciQfzFAk3atimnECDUQflCNtGEfv1iochXau+7toPR4Cr/a2mpu fHig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677786492; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=sPM4hKCJz6N9FfvFWxNFvNyLpwk0EfbNxxhdXNJPU2c=; b=61VVFqC7vW8UVz1stNsjwShzb8PMAZb7Uy+4FKIrY/j0SV4xHRGC0qy0NVpFenKskU 9ufmsXKPHQxhIWE9U5cQinkHm91OcKjVqZCLBnAa+xoxfX0nlHEK1EMCn/V7G3AoE/1Z xY5mhe3wM7Nbzr7TclPjkEwiWo/5SZqgiPjldoooIiSv2f2jT5Xr5KR1Kzkx3VbV8dBD fs3x3IjrH00rvcdtPynaiIwmSc5CvTud7diKbOHrPQjJWP9Z7G2sn3GgwaYawTmwQLSk Khv3pW/573rlklAXZiVZH0UGRVPiU8MXJRP68MqccRBmue7XgLnSWeUd1Sbau9mjgNRo kdcA== X-Gm-Message-State: AO0yUKUQk91zKq80tkDp2DtWyIUeuD5F+j6tHg5nq9pxj0RNHucOCGoy u59uxbP9zv4HDyqUCOaWv+v15b+7Xxc= X-Google-Smtp-Source: AK7set8T9UL5IShI6kveSN7UZqImrbVN5UGJN+tZXhKnzl2sCajl5TDePkpfYP55j4/edg5EG91flg== X-Received: by 2002:a5d:4cc7:0:b0:2c7:8a6f:5568 with SMTP id c7-20020a5d4cc7000000b002c78a6f5568mr6418378wrt.3.1677786491910; Thu, 02 Mar 2023 11:48:11 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id z7-20020a5d4407000000b002c5503a8d21sm210640wrq.70.2023.03.02.11.48.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 11:48:11 -0800 (PST) From: Simon Tournier To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61910: [PATCH] git-download: Download a bare Git repository from SWH. References: <20230302091233.28226-1-ludo@gnu.org> <20230302120546.1074630-1-zimon.toutoune@gmail.com> <87cz5r5m7a.fsf_-_@gnu.org> Date: Thu, 02 Mar 2023 18:42:48 +0100 In-Reply-To: (Simon Tournier's message of "Thu, 2 Mar 2023 14:50:56 +0100") Message-ID: <87356nf3s7.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61910 Cc: 61910@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Follow up after discussing on #swh-devel. :-) On jeu., 02 mars 2023 at 14:50, Simon Tournier w= rote: > So the question is how to know which files require CRLF and which not? > > From my understanding, this information is provided by: > > $ cat hidapi.guix/.gitattributes > * text=3Dauto > > *.sln text eol=3Dcrlf > *.vcproj text eol=3Dcrlf > > bootstrap text eol=3Dlf > configure.ac text eol=3Dlf Yeah, we could parse this file. It is not that hard but I am not so much interested right now for implementing such. > As zack pointed yesterday, well that what I understood or > misunderstood, it is related to "smudge" filters [1]. No, it is not =E2=80=9Csmudge=E2=80=9D. These attributes are much simpler = than smudge/clean filters =E2=80=93 well they are scary! > Kidding aside, I agree that relying on Guile-Git would mean being less > "fragile". Hum, somehow this asks about the size of the binary seed > for bootstrapping. After some quick look, Guile-Git provides some plumbing and here it is more about porcelain. Well, I do not know how it could be implemented with Guile-Git. > About low-level 'git' command, maybe the same could be achieved > without "git init" + "git add" + "git commit". Well, my gitology is > not enough skilled. :-) Asking on #swh-devel, vlorentz confirmed using something similar. Quoting: =C2=AB I looked at git's normalization-related test cases; but they all use git-add =C2=BB Therefore, I guess that=E2=80=99s probably the best tradeoff for now. Well, I am going to run more tests. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 03 06:12:21 2023 Received: (at 61910) by debbugs.gnu.org; 3 Mar 2023 11:12:21 +0000 Received: from localhost ([127.0.0.1]:59793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY3Kn-00021i-0X for submit@debbugs.gnu.org; Fri, 03 Mar 2023 06:12:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY3Kl-00021V-5O for 61910@debbugs.gnu.org; Fri, 03 Mar 2023 06:12:19 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY3Kf-0000Pz-Tv; Fri, 03 Mar 2023 06:12:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=NxyuZ1qEdME51HjHRSsjuU8yHZzgadOGe996dPz33PY=; b=kcLnYwD1mOyAm8wxU/Tc OVclNrFrLzt4FpbberTmqsK50hyHRmECuQhlNENGP/XTzomLr8/GTk17sG0g91LCOJbNIG7gvLRv9 6fS41cuoVvHL96hTq7Ank0Q5rQxPTAL3cMarK3RQmG34pGKiskngvcn6axp//LrPtzXzTLNdcdo4L 8DFOzVc6dc/jUNZq+XnQGpGdldDdHic1TJR0Z83HgYsWepOmls1yu2IUuBwCUi07EAPY3w75PTt10 xYviMil8tMTQiebQ1qfhkIwGJTtWk8OLwRlIgGPQuJeZHSa4W6yiOUsf3pgHQ1LdjniFr86RbnhtN mqM2qJZZGvnDpQ==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY3Kf-0003fU-BA; Fri, 03 Mar 2023 06:12:13 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: bug#61910: [PATCH] git-download: Download a bare Git repository from SWH. References: <20230302091233.28226-1-ludo@gnu.org> <20230302120546.1074630-1-zimon.toutoune@gmail.com> <87cz5r5m7a.fsf_-_@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 13 =?utf-8?Q?Vent=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour de la Fumeterre 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: Fri, 03 Mar 2023 12:12:10 +0100 In-Reply-To: (Simon Tournier's message of "Thu, 2 Mar 2023 14:50:56 +0100") Message-ID: <87a60uxf5h.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61910 Cc: 61910@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Simon Tournier skribis: > On Thu, 2 Mar 2023 at 14:15, Ludovic Court=C3=A8s wrote: [...] >> I wonder if we could achieve the same without creating a repo just to >> delete it afterwards, either by invoking a low-level =E2=80=98git=E2=80= =99 command it if >> exists, or using Guile-Git, or doing it ourselves in Scheme. > > Doing it ourselves in Scheme, I do not know. I guess it would be > hard. [...] > From my understanding, this information is provided by: > > $ cat hidapi.guix/.gitattributes > * text=3Dauto > > *.sln text eol=3Dcrlf > *.vcproj text eol=3Dcrlf > > bootstrap text eol=3Dlf > configure.ac text eol=3Dlf Uh, tricky enough. [...] > Kidding aside, I agree that relying on Guile-Git would mean being less > "fragile". Libgit2 has an =E2=80=9Cattr=E2=80=9D interface=C2=B9 that Guile-Git only p= artially binds. That interface works on a repo, so we=E2=80=99d still have to =E2=80=98git = init=E2=80=99 just to be able to read those attributes. Not great. =C2=B9 https://libgit2.org/libgit2/#HEAD/group/attr But anyway, skimming through gitattributes(5) has convinced me that we should not try to implement it by ourselves. :-) > About low-level 'git' command, maybe the same could be achieved > without "git init" + "git add" + "git commit". Well, my gitology is > not enough skilled. :-) I did a quick search and didn=E2=80=99t find anything so it looks like the strategy you chose is the right one. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 03 08:27:55 2023 Received: (at 61910-done) by debbugs.gnu.org; 3 Mar 2023 13:27:55 +0000 Received: from localhost ([127.0.0.1]:59948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY5Rz-00088o-8t for submit@debbugs.gnu.org; Fri, 03 Mar 2023 08:27:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY5Rx-00088W-HC for 61910-done@debbugs.gnu.org; Fri, 03 Mar 2023 08:27:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY5Rr-00048r-V5; Fri, 03 Mar 2023 08:27:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=IoeJRRfzWez5sF6WQ96UnEjhAlVYcQmovzg7PwH6QaI=; b=k+dkp0bp4RLpHCZQjc5s DrGNEDsvpZt3i0RNlk9ieQEatJTQMQaK1CfARUgoGL64MyC+cEs6LzlK0dMosdg+KtyCfRYEMJyGh 9+ZcQnK/6NBtxQAxMWrSMlB/oXOQgA7irwMNRPdBXi0btjZsCcmNPbQgdwqX16XYervj7QuLN5iOj xMcpEJcu2pVuQEd7bxe3DyNNrUYmWa2SXkMJAfvRurNPMJL96b2qIM7QkCtu0Z6Rj55yTNcRHkmn2 hHIu61kasRKXUW3aiqWPlIWHgtbqm9NLRRF4e9RUtPytXJ5zHZTkyx2wZFguFrZ13Q1tdB1wuTHOu Sqk689m0QiayZA==; Received: from [193.50.110.138] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY5RL-0002A1-UA; Fri, 03 Mar 2023 08:27:18 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: bug#61910: [PATCH] git-download: Download a bare Git repository from SWH. References: <20230302091233.28226-1-ludo@gnu.org> <20230302120546.1074630-1-zimon.toutoune@gmail.com> <87cz5r5m7a.fsf_-_@gnu.org> <87a60uxf5h.fsf@gnu.org> Date: Fri, 03 Mar 2023 14:27:14 +0100 In-Reply-To: <87a60uxf5h.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Fri, 03 Mar 2023 12:12:10 +0100") Message-ID: <87wn3yvubx.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61910-done Cc: 61910-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi again, I pushed a slightly modified version of your patch as commit 58f20fa8181bdcd4269671e1d3cef1268947af3a. It still passes the hidapi test. :-) Let me know if anything=E2=80=99s amiss! Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 03 14:02:01 2023 Received: (at 61910-done) by debbugs.gnu.org; 3 Mar 2023 19:02:01 +0000 Received: from localhost ([127.0.0.1]:33993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYAfI-0003F7-PQ for submit@debbugs.gnu.org; Fri, 03 Mar 2023 14:02:01 -0500 Received: from mail-wm1-f42.google.com ([209.85.128.42]:46666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYAfG-0003Eo-Rv for 61910-done@debbugs.gnu.org; Fri, 03 Mar 2023 14:01:59 -0500 Received: by mail-wm1-f42.google.com with SMTP id l7-20020a05600c1d0700b003eb5e6d906bso1830531wms.5 for <61910-done@debbugs.gnu.org>; Fri, 03 Mar 2023 11:01:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677870113; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XhogznJufE3Nn03BYI0BmWcS1vP0TQQRD3lTOM9YELM=; b=CxVLYMO8GPhLZDXoDGjoKuvcH9TH9NWPOvU+DFFjoWvHpCpkAUmbfcSsBM6kqUPEbI ifLaUJ/90GzV04t3GTafgx5ofyo0+6oc3r/ZLG8tjiMqWbh2zXWEwabJwqculmOnfLAh qeF2FN/CEbSj6BZ6M1qtSFW8NRSrrjA6HusnmUvTrluifsW/Ex7qbTxeb0aivfXEHMxZ afLhi8qI7KPldMaACylDdDqvkRNL+ZjOAT4LmDIg51uEMeu8wfO7xM7arhYceDPpz9JC qvfV1csyrt2sCYPeKPWXU29Ls1JrR3AS8lX2Ugu/iaF5SFoEAVyXsi6bOz/echRbNRuy iyng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677870113; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XhogznJufE3Nn03BYI0BmWcS1vP0TQQRD3lTOM9YELM=; b=Iiy93SCr8/lqKWZxHJgk8wY/vrHTTWOWCtm5d0T6fGYkQnARtDFtP9ZwQtGjkjf92q Lk209kIhu7WJ/rsTGvU+v1Mkgnw5spk72WV2+HQolJNXS6V3q7/H9TILz0Bk9DBpY3bj qzd2jPiVelPna/Rr7093NqEqdo4Xv++GeQg2VW2IXiZSj6W+kDPB662Fgwu/U7HgilxU fKfG4exUw9nWtGY4dYcN21LlwMbgDwT0XS6yh11z4vXehf6eEXMGSiEXD1gk80DuLrLW Qc2D6SCNcbmVTsZxm5tpGsJO4Vgez4sqIQLy36Z9r6sGaJ1dVWrtofgLa6u3TqjLA/fA hZMA== X-Gm-Message-State: AO0yUKVTcC057iGmy1m2L6v1YToxw1qKVAB2PKvuUpEyqciggvFD7uHu 2v73dZ5sU5o3zHsQKm3Lwj/WM6PxaA8= X-Google-Smtp-Source: AK7set/P3YvLUgEFgco4Y5IKKaB5CHVLWHux7+MoJSoG8g1958t3z8WMyIpZMP/i7x8n4nwKJKWzjQ== X-Received: by 2002:a05:600c:3c96:b0:3e2:415:f09f with SMTP id bg22-20020a05600c3c9600b003e20415f09fmr2302966wmb.3.1677870112570; Fri, 03 Mar 2023 11:01:52 -0800 (PST) Received: from lili (roam-nat-fw-prg-194-254-61-43.net.univ-paris-diderot.fr. [194.254.61.43]) by smtp.gmail.com with ESMTPSA id l36-20020a05600c08a400b003eb39e60ec9sm2986632wmp.36.2023.03.03.11.01.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Mar 2023 11:01:52 -0800 (PST) From: Simon Tournier To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#61910: [PATCH] git-download: Download a bare Git repository from SWH. In-Reply-To: <87wn3yvubx.fsf_-_@gnu.org> References: <20230302091233.28226-1-ludo@gnu.org> <20230302120546.1074630-1-zimon.toutoune@gmail.com> <87cz5r5m7a.fsf_-_@gnu.org> <87a60uxf5h.fsf@gnu.org> <87wn3yvubx.fsf_-_@gnu.org> Date: Fri, 03 Mar 2023 19:52:16 +0100 Message-ID: <86pm9pzmzj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61910-done Cc: 61910-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Fri, 03 Mar 2023 at 14:27, Ludovic Court=C3=A8s wrote: > Let me know if anything=E2=80=99s amiss! The version using =E2=80=99file-exists?=E2=80=99 works well for Julia packa= ges. Well, I will try your submitted one later next week. :-) Cheers, simon From unknown Fri Jun 20 07:17:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 01 Apr 2023 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator