GNU bug report logs - #65352
Fix time-machine and network

Previous Next

Package: guix-patches;

Reported by: Simon Tournier <zimon.toutoune <at> gmail.com>

Date: Thu, 17 Aug 2023 14:08:02 UTC

Severity: normal

Done: Simon Tournier <zimon.toutoune <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: 65352 <at> debbugs.gnu.org
Cc: Simon Tournier <zimon.toutoune <at> gmail.com>
Subject: [bug#65352] [PATCH 1/2] guix: git: Fix the procedure reference-available?.
Date: Thu, 17 Aug 2023 16:09:16 +0200
* guix/git/scm (reference-available?): Rely of the procedure resolve-reference
to determine if the reference belongs to the local Git checkout.
---
 guix/git.scm | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/guix/git.scm b/guix/git.scm
index dbc3b7caa7..ebe2600209 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -360,17 +360,8 @@ (define-syntax-rule (false-if-git-not-found exp)
 (define (reference-available? repository ref)
   "Return true if REF, a reference such as '(commit . \"cabba9e\"), is
 definitely available in REPOSITORY, false otherwise."
-  (match ref
-    ((or ('commit . commit)
-         ('tag-or-commit . (? commit-id? commit)))
-     (let ((len (string-length commit))
-           (oid (string->oid commit)))
-       (false-if-git-not-found
-        (->bool (if (< len 40)
-                    (object-lookup-prefix repository oid len OBJ-COMMIT)
-                    (commit-lookup repository oid))))))
-    (_
-     #f)))
+  (false-if-git-not-found
+   (->bool (resolve-reference repository ref))))
 
 (define (clone-from-swh url tag-or-commit output)
   "Attempt to clone TAG-OR-COMMIT (a string), which originates from URL, using

base-commit: 1b2d43fe016848ea2ec16ff18cbc14340944fc4e
-- 
2.38.1





This bug report was last modified 1 year and 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.