From unknown Fri Sep 19 21:29:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#26777: [PATCH] guix: git: Add new module. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 04 May 2017 14:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26777 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 26777@debbugs.gnu.org Cc: Mathieu Othacehe X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14939094095591 (code B ref -1); Thu, 04 May 2017 14:51:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2017 14:50:09 +0000 Received: from localhost ([127.0.0.1]:54671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6I52-0001S7-U5 for submit@debbugs.gnu.org; Thu, 04 May 2017 10:50:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6I51-0001Rk-9t for submit@debbugs.gnu.org; Thu, 04 May 2017 10:50:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6I4u-0006c2-DO for submit@debbugs.gnu.org; Thu, 04 May 2017 10:50:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38509) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d6I4u-0006by-9U for submit@debbugs.gnu.org; Thu, 04 May 2017 10:50:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6I4q-0004m5-N4 for guix-patches@gnu.org; Thu, 04 May 2017 10:50:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6I4l-0006Z8-N0 for guix-patches@gnu.org; Thu, 04 May 2017 10:49:56 -0400 Received: from mail-wr0-x233.google.com ([2a00:1450:400c:c0c::233]:34461) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6I4l-0006Yg-Di for guix-patches@gnu.org; Thu, 04 May 2017 10:49:51 -0400 Received: by mail-wr0-x233.google.com with SMTP id l9so9269770wre.1 for ; Thu, 04 May 2017 07:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Eh9WeKtGLRF1Z9IkjUzSq9F7pU93HISWo6mmajK90RE=; b=YVJTUZcAdd/wK2hC6n+uSefvX/fH1eBWdSd/onkViJZRHdtavl2TPw3zfPYTYGI2x2 l2MvlZH2zWmmYF0DhcxWOfktOYkvm3DnmzrIaYtc1mVJRfcXCvYZ311vT7SSTdXVbIeK DcL3RuEIpc+vc0p9WlWGvY1jT68BWarL5jj8o3ITOQVE4/Si0sY8o7y2i20uINifondz uEn29E2BRRayrRw2JUr9rmtXwdrwxwlaGMYH/vq5NdVAKxWQqscm2moGyQ0R5yyZjpwW sT28DvPoHhinySEH9NZ6f1Be1b+LlJKibsVLYZc4H9Oz+W2HFlgWnkeksYZfJxJv02Sr 4q/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Eh9WeKtGLRF1Z9IkjUzSq9F7pU93HISWo6mmajK90RE=; b=dxtzy5FHG896/RzIoqve9Mq30sCnwgNDEcKdxh5+Hw4vX+tpGtAnXasNKoet+bSDg3 LCdTn4dtWoOicAuCrkhDXuXOFqoIoxD7YBOBD7HQviExj9r0J30DTxIbyxR7yxfSVIZG mp4oX7j9LeTzjBg8nTx4vkKfIiocitBB3DxLKeAGKqDn6ZQAJBR/meJEzVAOuWdg+KRt B+2/W4GA9X4dq5JDDlARB3uDiSZvq1L6H5Ptd0tQQUiRSIfeLVScrOy+nfYEDaZ5sHnG 4qQbhw/egc3xG3K0FXgbNOrf1USylcvg0AqMdcCT4lUp+vJNZxpGYxVBw9hxINuNVTbb eq0A== X-Gm-Message-State: AN3rC/7r2DEXjb7xvSO9X3QE2C6Mpm85Aazq7ltHleJAPRFV1xWPIxN0 lt9k+V7V91Uj+w== X-Received: by 10.223.136.131 with SMTP id f3mr29878097wrf.70.1493909390070; Thu, 04 May 2017 07:49:50 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 7sm1520785wrs.69.2017.05.04.07.49.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 May 2017 07:49:49 -0700 (PDT) From: Mathieu Othacehe Date: Thu, 4 May 2017 16:49:44 +0200 Message-Id: <20170504144944.8635-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) 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: -4.0 (----) * guix/git.scm: New file. * configure.ac: Check for (guile git). * Makefile.am: Build guix/git.scm if (guile git) is available. --- Makefile.am | 7 +++ configure.ac | 4 ++ guix/git.scm | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+) create mode 100644 guix/git.scm diff --git a/Makefile.am b/Makefile.am index c6d8de68b..67491a11a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -197,6 +197,13 @@ MODULES += \ endif HAVE_GUILE_SSH +if HAVE_GUILE_GIT + +MODULES += \ + guix/git.scm + +endif HAVE_GUILE_GIT + if BUILD_DAEMON_OFFLOAD MODULES += \ diff --git a/configure.ac b/configure.ac index 2b4620c44..2f6eff128 100644 --- a/configure.ac +++ b/configure.ac @@ -102,6 +102,10 @@ dnl Guile-JSON is used in various places. GUILE_MODULE_AVAILABLE([have_guile_json], [(json)]) AM_CONDITIONAL([HAVE_GUILE_JSON], [test "x$have_guile_json" = "xyes"]) +dnl Check for Guile-Git. +GUILE_MODULE_AVAILABLE([have_guile_git], [(git)]) +AM_CONDITIONAL([HAVE_GUILE_GIT], [test "x$have_guile_git" = "xyes"]) + dnl Make sure we have a full-fledged Guile. GUIX_ASSERT_GUILE_FEATURES([regex posix socket net-db threads]) diff --git a/guix/git.scm b/guix/git.scm new file mode 100644 index 000000000..b6bc00838 --- /dev/null +++ b/guix/git.scm @@ -0,0 +1,140 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix git) + #:use-module (git) + #:use-module (git object) + #:use-module (guix base32) + #:use-module (guix hash) + #:use-module (guix build utils) + #:use-module (guix store) + #:use-module (guix utils) + #:use-module (rnrs bytevectors) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:export (%repository-cache-path + latest-repository-commit)) + +(define %repository-cache-path + (make-parameter "/var/cache/guix/checkouts")) + +(define-syntax-rule (with-libgit2 thunk ...) + (dynamic-wind + (lambda () + (libgit2-init!)) + (lambda () + thunk ...) + (lambda () + (libgit2-shutdown)))) + +(define (repository-cache-directory url) + "Return the directory associated to URL in %repository-cache-path." + (string-append + (%repository-cache-path) "/" + (bytevector->base32-string (sha256 (string->utf8 url))))) + +(define (clone-with-error-handling url path) + "Clone git repository at URL into PATH with error handling." + (catch 'git-error + (lambda () + (mkdir-p path) + (clone url path)) + (lambda (key . parameters) + (rmdir path) + (error "Clone error: " parameters)))) + +(define (repository->head-sha1 repo) + "Return the sha1 of the HEAD commit in REPOSITORY as a string." + (let ((oid (reference-target (repository-head repo)))) + (oid->string (commit-id (commit-lookup repo oid))))) + +(define (url+commit->name url sha1) + "Return the string \"-\" where REPO-NAME is the name of +the git repository, extracted from URL and SHA1:7 the seven first digits +of SHA1 string." + (string-append + (string-replace-substring + (last (string-split url #\/)) ".git" "") + "-" (string-take sha1 7))) + +(define* (copy-to-store cache-path #:key url repository) + "Copy items in cache-path to store. URL and REPOSITORY are used +to forge store directory name." + (let* ((commit (repository->head-sha1 repository)) + (name (url+commit->name url commit))) + (with-store store + (values (add-to-store store name #t "sha256" cache-path) commit)))) + +(define (switch-to-ref repository ref) + "Switch to REPOSITORY's branch, commit or tag specified by REF." + (let* ((oid (match ref + (('branch . branch) + (reference-target + (branch-lookup repository branch BRANCH-REMOTE))) + (('commit . commit) + (string->oid commit)) + (('tag . tag) + (reference-name->oid repository + (string-append "refs/tags/" tag))))) + (obj (object-lookup repository oid))) + ;; guile-git checkout binding seems broken. + (reset repository obj RESET_HARD))) + +(define (switch-to-ref* repository ref) + "Switch to REF in REPOSITORY with error handling." + (catch 'git-error + (lambda () + (switch-to-ref repository ref)) + (lambda (key . parameters) + (error + (format #f "Failed to switch to ref ~s: ~s" ref parameters))))) + +(define (remote-fetch* repository remote-name) + "Fetch REMOTE-NAME of REPOSITORY with error handling." + (catch 'git-error + (lambda () + (remote-fetch (remote-lookup repository remote-name))) + (lambda (key . parameters) + (error + (format #f "Failed to fetch remote ~a: ~a" remote-name parameters))))) + +(define* (latest-repository-commit url + #:key + (ref '(branch . "origin/master"))) + "Return two values: the content of the git repository at URL copied into a +store directory and the sha1 of the top level commit in this directory. The +reference to be checkout, once the repository is fetched, is specified by REF. +REF is pair whose key is [branch | commit | tag] and value the associated +data, respectively [ | | ]. + +Git repositories are kept in the cache directory specified by +%repository-cache-path parameter." + (with-libgit2 + (let* ((cache-dir (repository-cache-directory url)) + (cache-exists? (openable-repository? cache-dir)) + (repository (if cache-exists? + (repository-open cache-dir) + (clone-with-error-handling url cache-dir)))) + ;; Only fetch remote if it has not been cloned just before. + (when cache-exists? + (remote-fetch* repository "origin")) + + (switch-to-ref* repository ref) + (copy-to-store cache-dir + #:url url + #:repository repository)))) -- 2.12.2 From unknown Fri Sep 19 21:29:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#26777: [PATCH] guix: git: Add new module. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 04 May 2017 16:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26777 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: 26777@debbugs.gnu.org Received: via spool by 26777-submit@debbugs.gnu.org id=B26777.149391358811727 (code B ref 26777); Thu, 04 May 2017 16:00:02 +0000 Received: (at 26777) by debbugs.gnu.org; 4 May 2017 15:59:48 +0000 Received: from localhost ([127.0.0.1]:54714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6JAS-000334-6A for submit@debbugs.gnu.org; Thu, 04 May 2017 11:59:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6JAR-00032r-2y for 26777@debbugs.gnu.org; Thu, 04 May 2017 11:59:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6JAI-0002pt-NG for 26777@debbugs.gnu.org; Thu, 04 May 2017 11:59:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6JAI-0002pn-Jr; Thu, 04 May 2017 11:59:38 -0400 Received: from [193.50.110.181] (port=43098 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d6JAI-0007Ww-5i; Thu, 04 May 2017 11:59:38 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170504144944.8635-1-m.othacehe@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 =?UTF-8?Q?Flor=C3=A9al?= an 225 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-unknown-linux-gnu Date: Thu, 04 May 2017 17:59:35 +0200 In-Reply-To: <20170504144944.8635-1-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Thu, 4 May 2017 16:49:44 +0200") Message-ID: <87d1bohau0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) 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: -5.0 (-----) Hi! Mathieu Othacehe skribis: > * guix/git.scm: New file. > * configure.ac: Check for (guile git). > * Makefile.am: Build guix/git.scm if (guile git) is available. Very nice! > +(define %repository-cache-path > + (make-parameter "/var/cache/guix/checkouts")) s/path/directory/ (In GNU the convention is to use the terms =E2=80=9Cfile = name=E2=80=9D or =E2=80=9Cdirectory name=E2=80=9D, or just =E2=80=9Cfile=E2=80=9D or =E2= =80=9Cdirectory=E2=80=9D (info "(standards) GNU Manuals").) > +(define (repository-cache-directory url) > + "Return the directory associated to URL in %repository-cache-path." > + (string-append > + (%repository-cache-path) "/" > + (bytevector->base32-string (sha256 (string->utf8 url))))) This is a detail, but in general, for arguments like the cache directory, I prefer an optional argument like this: (define* (repository-cache-directory url #:optional (cache-directory (%repository-cache-direc= tory))) =E2=80=A6) > +(define (clone-with-error-handling url path) > + "Clone git repository at URL into PATH with error handling." > + (catch 'git-error > + (lambda () > + (mkdir-p path) > + (clone url path)) s/path/directory/ > + (lambda (key . parameters) > + (rmdir path) > + (error "Clone error: " parameters)))) Just let the =E2=80=98git-error=E2=80=99 through: it=E2=80=99s the caller= =E2=80=99s responsibility to handle it. Same in other procedures that catch =E2=80=98git-error=E2=80=99. If really necessary, you can add: (define-syntax-rule (false-if-git-error exp) (catch 'git-error (lambda () exp) (const #f))) > +(define* (copy-to-store cache-path #:key url repository) > + "Copy items in cache-path to store. URL and REPOSITORY are used > +to forge store directory name." > + (let* ((commit (repository->head-sha1 repository)) > + (name (url+commit->name url commit))) > + (with-store store > + (values (add-to-store store name #t "sha256" cache-path) commit)))) Please make =E2=80=98store=E2=80=99 a parameter, so that the caller can cho= ose what store they connect to. Could you send an updated patch? Thank you! Ludo=E2=80=99. From unknown Fri Sep 19 21:29:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#26777: [PATCH] guix: git: Add new module. References: <20170504144944.8635-1-m.othacehe@gmail.com> In-Reply-To: <20170504144944.8635-1-m.othacehe@gmail.com> Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 May 2017 09:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26777 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 26777@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 26777-submit@debbugs.gnu.org id=B26777.149397505811248 (code B ref 26777); Fri, 05 May 2017 09:05:02 +0000 Received: (at 26777) by debbugs.gnu.org; 5 May 2017 09:04:18 +0000 Received: from localhost ([127.0.0.1]:55370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6Z9t-0002vL-KA for submit@debbugs.gnu.org; Fri, 05 May 2017 05:04:17 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6Z9o-0002v3-KX for 26777@debbugs.gnu.org; Fri, 05 May 2017 05:04:15 -0400 Received: by mail-wm0-f50.google.com with SMTP id m123so121079wma.0 for <26777@debbugs.gnu.org>; Fri, 05 May 2017 02:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=meqF5G4U1LKGCUpnXL7H4bj1XxmcnWiwnBWjoDyfaNU=; b=V75JrmLs56g0hfb6Fajazfl7glkkTvtxT/tjxqI1DFBXpnwccNGkYf7EsZ4ZrTkgGU s6mOP6rbzKSgNkETr4aCHuvXYbvH7x1TNYuLlBSv0pcf47e0GGxB1a/mGP2eAPa2mKmy ag3nKB+Fc8wNKx2OTXn+Dcp+YchyhPF7Gn3sNpN/tezmxxVz6jogj+cE3yPBK3zpyDYU ZMeEJFYBQQ0UE2KJ9Jk//qvLFseMqiZzdBnBDLsqaGw5utUB9sQQ657U896BEOyylxcU TkB6swbB5ySmUfez3KnVFWMOJ4AtEUelU2XtYgNAK2jrvM/EKBtfx+zEShLg2NZtXKPN T8qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=meqF5G4U1LKGCUpnXL7H4bj1XxmcnWiwnBWjoDyfaNU=; b=Z+XUlrkhq+6MZ2jpA4P457/TcXg28iK3KiXr4+AExjPydRvdzmiP8VLBDz1g+yp99q FH7LLCWUVzoY+iG8NwTqgesvqWUqMpqB3HujWLfZWzdNsHef0RSY4Ffa08cHKX2viR9z UdCdiQqbyeAEOrUdHq/w67G6/F040m0WgA4CPK6Egunf8oj7+K/epuSHGIHNDlnp2hOa BClFANaikMsKmlxvUovieRUM/dubb7fgriarkR5tqTVPNnSLhuc71/mMJOiG5O0sW72k d5C6OlXiyL0deSLIlNOdQlQu5SirUQAfRVwK6RUC/lRmZk88zh5XjqQ1gkEgT3pwl1yn Bj5Q== X-Gm-Message-State: AN3rC/7HJGMjSqC51TA+Z8qRgWS8R7F0GjTa5KLLq0OnTMR8HqHzJxLh BCRRL0RIO9FX5A== X-Received: by 10.28.102.65 with SMTP id a62mr4594874wmc.21.1493975046652; Fri, 05 May 2017 02:04:06 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id e12sm3041845wrc.42.2017.05.05.02.04.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 May 2017 02:04:05 -0700 (PDT) From: Mathieu Othacehe Date: Fri, 5 May 2017 11:04:01 +0200 Message-Id: <20170505090401.9036-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -0.0 (/) * guix/git.scm: New file. * configure.ac: Check for (guile git). * Makefile.am: Build guix/git.scm if (guile git) is available. --- Makefile.am | 7 ++++ configure.ac | 4 ++ guix/git.scm | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 guix/git.scm diff --git a/Makefile.am b/Makefile.am index 8fe9e350c..76e5d99c7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -197,6 +197,13 @@ MODULES += \ endif HAVE_GUILE_SSH +if HAVE_GUILE_GIT + +MODULES += \ + guix/git.scm + +endif HAVE_GUILE_GIT + if BUILD_DAEMON_OFFLOAD MODULES += \ diff --git a/configure.ac b/configure.ac index dc3d8f377..c937e948d 100644 --- a/configure.ac +++ b/configure.ac @@ -104,6 +104,10 @@ dnl Guile-JSON is used in various places. GUILE_MODULE_AVAILABLE([have_guile_json], [(json)]) AM_CONDITIONAL([HAVE_GUILE_JSON], [test "x$have_guile_json" = "xyes"]) +dnl Check for Guile-Git. +GUILE_MODULE_AVAILABLE([have_guile_git], [(git)]) +AM_CONDITIONAL([HAVE_GUILE_GIT], [test "x$have_guile_git" = "xyes"]) + dnl Make sure we have a full-fledged Guile. GUIX_ASSERT_GUILE_FEATURES([regex posix socket net-db threads]) diff --git a/guix/git.scm b/guix/git.scm new file mode 100644 index 000000000..d0c1c51a3 --- /dev/null +++ b/guix/git.scm @@ -0,0 +1,122 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix git) + #:use-module (git) + #:use-module (git object) + #:use-module (guix base32) + #:use-module (guix hash) + #:use-module (guix build utils) + #:use-module (guix store) + #:use-module (guix utils) + #:use-module (rnrs bytevectors) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:export (%repository-cache-directory + latest-repository-commit)) + +(define %repository-cache-directory + (make-parameter "/var/cache/guix/checkouts")) + +(define-syntax-rule (with-libgit2 thunk ...) + (dynamic-wind + (lambda () + (libgit2-init!)) + (lambda () + thunk ...) + (lambda () + (libgit2-shutdown)))) + +(define* (url-cache-directory url + #:optional (cache-directory + (%repository-cache-directory))) + "Return the directory associated to URL in %repository-cache-directory." + (string-append + cache-directory "/" + (bytevector->base32-string (sha256 (string->utf8 url))))) + +(define (clone* url directory) + "Clone git repository at URL into DIRECTORY. Upon failure, +make sure no empty directory is left behind." + (with-throw-handler #t + (lambda () + (mkdir-p directory) + (clone url directory)) + (lambda _ + (false-if-exception (rmdir directory))))) + +(define (repository->head-sha1 repo) + "Return the sha1 of the HEAD commit in REPOSITORY as a string." + (let ((oid (reference-target (repository-head repo)))) + (oid->string (commit-id (commit-lookup repo oid))))) + +(define (url+commit->name url sha1) + "Return the string \"-\" where REPO-NAME is the name of +the git repository, extracted from URL and SHA1:7 the seven first digits +of SHA1 string." + (string-append + (string-replace-substring + (last (string-split url #\/)) ".git" "") + "-" (string-take sha1 7))) + +(define* (copy-to-store cache-directory store #:key url repository) + "Copy items in cache-directory to store. URL and REPOSITORY are used +to forge store directory name." + (let* ((commit (repository->head-sha1 repository)) + (name (url+commit->name url commit))) + (values (add-to-store store name #t "sha256" cache-directory) commit))) + +(define (switch-to-ref repository ref) + "Switch to REPOSITORY's branch, commit or tag specified by REF." + (let* ((oid (match ref + (('branch . branch) + (reference-target + (branch-lookup repository branch BRANCH-REMOTE))) + (('commit . commit) + (string->oid commit)) + (('tag . tag) + (reference-name->oid repository + (string-append "refs/tags/" tag))))) + (obj (object-lookup repository oid))) + ;; guile-git checkout binding seems broken. + (reset repository obj RESET_HARD))) + +(define* (latest-repository-commit url store + #:key + (ref '(branch . "origin/master"))) + "Return two values: the content of the git repository at URL copied into a +store directory and the sha1 of the top level commit in this directory. The +reference to be checkout, once the repository is fetched, is specified by REF. +REF is pair whose key is [branch | commit | tag] and value the associated +data, respectively [ | | ]. + +Git repositories are kept in the cache directory specified by +%repository-cache-directory parameter." + (with-libgit2 + (let* ((cache-dir (url-cache-directory url)) + (cache-exists? (openable-repository? cache-dir)) + (repository (if cache-exists? + (repository-open cache-dir) + (clone* url cache-dir)))) + ;; Only fetch remote if it has not been cloned just before. + (when cache-exists? + (remote-fetch repository "origin")) + (switch-to-ref repository ref) + (copy-to-store cache-dir store + #:url url + #:repository repository)))) -- 2.12.2 From unknown Fri Sep 19 21:29:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#26777: [PATCH] guix: git: Add new module. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 May 2017 09:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26777 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 26777@debbugs.gnu.org Received: via spool by 26777-submit@debbugs.gnu.org id=B26777.149397584612407 (code B ref 26777); Fri, 05 May 2017 09:18:02 +0000 Received: (at 26777) by debbugs.gnu.org; 5 May 2017 09:17:26 +0000 Received: from localhost ([127.0.0.1]:55377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6ZMc-0003E3-16 for submit@debbugs.gnu.org; Fri, 05 May 2017 05:17:26 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6ZMa-0003Dr-US for 26777@debbugs.gnu.org; Fri, 05 May 2017 05:17:25 -0400 Received: by mail-wm0-f66.google.com with SMTP id z129so88729wmb.1 for <26777@debbugs.gnu.org>; Fri, 05 May 2017 02:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=xkUHPsSPSI13BIDx8XGrfuK5EhScU1frzz6wrDrTzb0=; b=W4GEh/lRp6aGUB9huXoYEfMEBcD2Q3geZiXxIe/4Ov/rmL7D0gZySLf98K3X5nNLnx OxOmSF+hxjxt83/xjKULVPkBtIDyOYKh3AMayGOoRGz8sxS1ooUrCRPSdq4QYosHDVf5 GTBOS4j5gxHeFfUi4MSci/09tnnPpUViIbC96K1Ep3MQWdQVArrIDwchlywv5m/l4Gh/ 6l/7f83bLbLtBk6JHkkJUUpbsGfqGmY+MyaDc4YMJaejznfOzkbU3SupGY9bgK77VOlr M940TdjUgcB9H5GDx3F9s1RYT9l9lOsTzDMSPpJZbspcB2UNFyAZyrXvhgjNwP5Li9Ig pBYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=xkUHPsSPSI13BIDx8XGrfuK5EhScU1frzz6wrDrTzb0=; b=eVFG/ztxUnt8i51TSPes3bORU0DzZBpC05aoMKHAbiGNS3aIs+Z3YwFQ/1miz7FvW1 jJPDEMoKTMk90uE45wB6SKESLqSetkCLcDGmU6nLUzAJqbVBOUswCAdl52z/q3a8Z9QV T43RTp3cuV6WdzrtEtoH8NtLqT6fWXkZlNKmco2DnRc+/P0fEYKEYL7gUmCil4GS6a0O yX3N/ZD1+iCShuL0v4kZiHYii7SpoD+fYbN1BpSqhw384OSjI/2ylMsxQT7B2L6EhBrt RT5iz+FCaFGnV3k6n4Wn5i0YhS7WOmRIAPO44+/ON8qmsxqoUFTD5xqljoSttEqB1aTZ xxfg== X-Gm-Message-State: AODbwcDFFH84EUObRkroHu5dPukZEBH44Hi7BTMLjsT1xRZBEF2RD46w H6XK5oD7riCXyg== X-Received: by 10.28.113.73 with SMTP id m70mr4952991wmc.12.1493975839325; Fri, 05 May 2017 02:17:19 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id 43sm5192441wrx.26.2017.05.05.02.17.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 May 2017 02:17:18 -0700 (PDT) References: <20170504144944.8635-1-m.othacehe@gmail.com> <87d1bohau0.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe In-reply-to: <87d1bohau0.fsf@gnu.org> Date: Fri, 05 May 2017 11:17:52 +0200 Message-ID: <86inlf4q7z.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) 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: 0.5 (/) Hi Ludo, > Very nice! Thanks :) > Could you send an updated patch? I just did. I stopped catching git-errors and used a with-throw-handler to make sure the directory mkdir-ed before cloning is removed if clone fails. And, unless I'm wrong the git-error should be re-raised. Mathieu From unknown Fri Sep 19 21:29:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#26777: [PATCH] guix: git: Add new module. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 May 2017 09:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26777 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: 26777@debbugs.gnu.org Received: via spool by 26777-submit@debbugs.gnu.org id=B26777.149397788215420 (code B ref 26777); Fri, 05 May 2017 09:52:01 +0000 Received: (at 26777) by debbugs.gnu.org; 5 May 2017 09:51:22 +0000 Received: from localhost ([127.0.0.1]:55395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6ZtS-00040e-0O for submit@debbugs.gnu.org; Fri, 05 May 2017 05:51:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6ZtQ-00040S-Qs for 26777@debbugs.gnu.org; Fri, 05 May 2017 05:51:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6ZtI-0008Do-Lq for 26777@debbugs.gnu.org; Fri, 05 May 2017 05:51:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6ZtI-0008Di-IU; Fri, 05 May 2017 05:51:12 -0400 Received: from [193.50.110.181] (port=54958 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d6ZtH-0003aT-F4; Fri, 05 May 2017 05:51:12 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170504144944.8635-1-m.othacehe@gmail.com> <20170505090401.9036-1-m.othacehe@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 =?UTF-8?Q?Flor=C3=A9al?= an 225 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-unknown-linux-gnu Date: Fri, 05 May 2017 11:51:09 +0200 In-Reply-To: <20170505090401.9036-1-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Fri, 5 May 2017 11:04:01 +0200") Message-ID: <87y3ubaaya.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) 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: -5.0 (-----) Hi! Mathieu Othacehe skribis: > * guix/git.scm: New file. > * configure.ac: Check for (guile git). > * Makefile.am: Build guix/git.scm if (guile git) is available. [...] > +(define* (copy-to-store cache-directory store #:key url repository) > + "Copy items in cache-directory to store. URL and REPOSITORY are used > +to forge store directory name." Could you make =E2=80=98store=E2=80=99 the first parameter, as is done else= where? > +(define (switch-to-ref repository ref) > + "Switch to REPOSITORY's branch, commit or tag specified by REF." > + (let* ((oid (match ref > + (('branch . branch) > + (reference-target > + (branch-lookup repository branch BRANCH-REMOTE))) > + (('commit . commit) > + (string->oid commit)) > + (('tag . tag) > + (reference-name->oid repository > + (string-append "refs/tags/" tag)))= )) > + (obj (object-lookup repository oid))) > + ;; guile-git checkout binding seems broken. > + (reset repository obj RESET_HARD))) Could you add an XXX to this comment and perhaps say why this is broken? Regardless of brokenness, it sounds safer to always hard-reset the checkout to make sure we=E2=80=99re in the right state, no? So maybe you c= an even remove the comment. :-) > +(define* (latest-repository-commit url store > + #:key > + (ref '(branch . "origin/master"))) > + "Return two values: the content of the git repository at URL copied in= to a > +store directory and the sha1 of the top level commit in this directory. = The > +reference to be checkout, once the repository is fetched, is specified b= y REF. > +REF is pair whose key is [branch | commit | tag] and value the associated > +data, respectively [ | | ]. Please make =E2=80=98store=E2=80=99 the first argument, and add #:key (cache-directory (%repository-cache-directory)) OK for =E2=80=98master=E2=80=99 with changes along these lines. Thank you! Ludo=E2=80=99. From unknown Fri Sep 19 21:29:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#26777: [PATCH] guix: git: Add new module. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 May 2017 17:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26777 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 26777@debbugs.gnu.org Received: via spool by 26777-submit@debbugs.gnu.org id=B26777.149400690923181 (code B ref 26777); Fri, 05 May 2017 17:56:02 +0000 Received: (at 26777) by debbugs.gnu.org; 5 May 2017 17:55:09 +0000 Received: from localhost ([127.0.0.1]:56658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6hRc-00061p-Ob for submit@debbugs.gnu.org; Fri, 05 May 2017 13:55:08 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:34591) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6hRb-00061X-P8 for 26777@debbugs.gnu.org; Fri, 05 May 2017 13:55:08 -0400 Received: by mail-wm0-f44.google.com with SMTP id u65so4302310wmu.1 for <26777@debbugs.gnu.org>; Fri, 05 May 2017 10:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=5n50HFETOyTjZitnaKNL7K2PWGo1k5XaOOctA+sD0hs=; b=qJC37pD+d5rsmT12aASeP1alXiOrOjbyeYaJH0AITYlZmDGIbRqIkSpo2dvcxvDCIc i8KzHm8APPqiKyRrsMHHteqrRi/DB9YAWFJpuHeIOo0eWXNiQxr+qrZsKdCefOGiEelz xWE4+jF7tWVjgAzNGAHqBtGBkFhL4aLeDShbQ3/ydJZSgwVvgeej+fS7W24ylXV95flR yDNc4GXJQ9FUn63DFWERlZnFqsp8FXjKGmPH84Qrz/i/AKs5258DhvQLCbYBi+7RcikC NaO6wQ/tNbJZV/Y6QmzjZf6qUA06BzACrmbTSsIi5QGPcGAsLptYF8g+oPi4oY6LtKKD oFPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=5n50HFETOyTjZitnaKNL7K2PWGo1k5XaOOctA+sD0hs=; b=qfevcFE+b0mjYO9oIUAS00DTzi1lABXSI9ghVc1odCA5kq1hwc0ec48soHOIMfvh+N S/ZzYkmT0OmGX3ShjO8LmmXaa+a0WEOjLn7B14JxdT1ysPwgwHpWoiC5cVU338DjLEel eLhXLr9mO1D1IFXXD2f2n1d2KnKluA6yVJkm/n2laERCgNkY6ZaHnjH9vSH7d7WxJUWz DWQ0n2mjB7wWsND90JO7oTlz0bzuN6reOhoZuXXgWq7jJM2YdVLrK0rfdlpIezZAaX3+ iLWVZksYCvuR5Tll3BE0l6EAmLpdc1c+8ZPl1liSiJidN0iuOvUrHV9Z0qj6LacASRXl DvNg== X-Gm-Message-State: AODbwcBlvprFwOB/iR0qn0PuCuDMtmjqdrjTW2T4lFfEtDFtseKn4Mtm B6KariBCxkg6XQ== X-Received: by 10.28.55.3 with SMTP id e3mr6330615wma.7.1494006901834; Fri, 05 May 2017 10:55:01 -0700 (PDT) Received: from cervin ([80.12.33.114]) by smtp.gmail.com with ESMTPSA id l29sm2112873wmi.8.2017.05.05.10.55.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 May 2017 10:55:01 -0700 (PDT) References: <20170504144944.8635-1-m.othacehe@gmail.com> <20170505090401.9036-1-m.othacehe@gmail.com> <87y3ubaaya.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe In-reply-to: <87y3ubaaya.fsf@gnu.org> Date: Fri, 05 May 2017 19:54:59 +0200 Message-ID: <87mvarqjd8.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -0.0 (/) > Could you add an XXX to this comment and perhaps say why this is broken? > Regardless of brokenness, it sounds safer to always hard-reset the > checkout to make sure we’re in the right state, no? So maybe you can > even remove the comment. :-) I removed it :) > OK for ‘master’ with changes along these lines. Pushed as a70b784708fb5e1b78430aa793d89ca04bc641a8. Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 13:55:46 2017 Received: (at control) by debbugs.gnu.org; 5 May 2017 17:55:46 +0000 Received: from localhost ([127.0.0.1]:56661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6hSE-00062m-0e for submit@debbugs.gnu.org; Fri, 05 May 2017 13:55:46 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6hSC-00062Y-Ee for control@debbugs.gnu.org; Fri, 05 May 2017 13:55:44 -0400 Received: by mail-wr0-f196.google.com with SMTP id g12so1397430wrg.2 for ; Fri, 05 May 2017 10:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject; bh=1OdHnH7AQWbLJNrXokLQCDQiRseWot85W0qfC0PYp2A=; b=OLB/xtEPJVTmP/+AZ/sc3eYn9bQn07yMEvfYgacIV7YGd/TY8XOx01QPyE7gCO7Wj+ oN9nH8Msp+ccnNTZ9BbNLayXdtFcx7TCUg4jAzKdPkRk745F4F2B2X9xV6gpY5fV7sD6 g94EhBE1e5B3dMF0YCBopeWj6TABuVF4LkSdnWQa1YMwyBGp60fnL2u8N6B91nFMkdEC G/OQmGr4Fwzy1JSLKPeLApXRowIb1Lf+Zqi7ClTR4C5FvkIPdbCs8wYN54LiTcRhtCvc 1EiELcOjjwV+DnJysNQ9IDSCj4/xWTYH5g7ACHIePM3cokg9Z2xjodWmShqw8mUMJanQ 7p/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject; bh=1OdHnH7AQWbLJNrXokLQCDQiRseWot85W0qfC0PYp2A=; b=RTILhT1DYphwrO7vcWiaSCaO+Dnp8+2JCOEXTSzXOKc3VkeJABYJN0iMy5xxaWBgGj mVVWtLd5uW9jZSmknOCWPStmHygQXBl6wD7SxDn2+f1Yo8LeyClxQ6LI8gc6yC+1cMQr UAawGRsc7cpuvZgRqdeGAv9FQFyaQGBzPVAUUh/gxgPtDTDuB/ULxxU47uRKdWQfECMi 5SbZ743d+9ibv5oeR28yfQttgVL1BXETC4MJCnBvNAd5bljYk1oUsEuVzmVJDhidyDfo 5Vzi1ogkHLFRZ2X/quOONvm9QM4WO2CwgOUOFitDsaRu7qvZsPIWi1nVzGXg3BqV0Mi7 ThCg== X-Gm-Message-State: AN3rC/5dYrG1ZA+3IZVmvDBp0AXkOr6LYXtnRh8jNtkifbWQOR9C1XJ3 Zty4p6eRxIP+m9ASTUU= X-Received: by 10.223.150.3 with SMTP id b3mr30982460wra.78.1494006938418; Fri, 05 May 2017 10:55:38 -0700 (PDT) Received: from cervin ([80.12.33.114]) by smtp.gmail.com with ESMTPSA id o189sm3043728wmg.32.2017.05.05.10.55.37 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 May 2017 10:55:37 -0700 (PDT) Date: Fri, 05 May 2017 19:55:36 +0200 Message-Id: <87lgqbqjc7.fsf@gmail.com> To: control@debbugs.gnu.org From: Mathieu Othacehe Subject: control message for bug #26777 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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: -2.3 (--) close 26777 From unknown Fri Sep 19 21:29:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#26777: [PATCH] guix: git: Add new module. Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 May 2017 20:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26777 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: 26777-done@debbugs.gnu.org Received: via spool by 26777-done@debbugs.gnu.org id=D26777.149401559531389 (code D ref 26777); Fri, 05 May 2017 20:20:03 +0000 Received: (at 26777-done) by debbugs.gnu.org; 5 May 2017 20:19:55 +0000 Received: from localhost ([127.0.0.1]:56822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6jhj-0008AB-9y for submit@debbugs.gnu.org; Fri, 05 May 2017 16:19:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6jhi-0008A0-4x for 26777-done@debbugs.gnu.org; Fri, 05 May 2017 16:19:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6jhZ-0005KH-3C for 26777-done@debbugs.gnu.org; Fri, 05 May 2017 16:19:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6jhY-0005KD-Us; Fri, 05 May 2017 16:19:45 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:47032 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d6jhY-0002I3-8x; Fri, 05 May 2017 16:19:44 -0400 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170504144944.8635-1-m.othacehe@gmail.com> <20170505090401.9036-1-m.othacehe@gmail.com> <87y3ubaaya.fsf@gnu.org> <87mvarqjd8.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 =?UTF-8?Q?Flor=C3=A9al?= an 225 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-unknown-linux-gnu Date: Fri, 05 May 2017 22:19:42 +0200 In-Reply-To: <87mvarqjd8.fsf@gmail.com> (Mathieu Othacehe's message of "Fri, 05 May 2017 19:54:59 +0200") Message-ID: <871ss312g1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) 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: -5.0 (-----) Mathieu Othacehe skribis: >> Could you add an XXX to this comment and perhaps say why this is broken? >> Regardless of brokenness, it sounds safer to always hard-reset the >> checkout to make sure we=E2=80=99re in the right state, no? So maybe yo= u can >> even remove the comment. :-) > > I removed it :) > >> OK for =E2=80=98master=E2=80=99 with changes along these lines. > > Pushed as a70b784708fb5e1b78430aa793d89ca04bc641a8. Great. Remember to email NNN-done@debbugs.gnu.org when you=E2=80=99re done. :-) Thanks, Ludo=E2=80=99.