aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-09-10 15:53:32 +0200
committerLudovic Courtès <ludo@gnu.org>2021-09-18 23:08:32 +0200
commitdce2cf311bc12dee4560329f53ccb53470d5793e (patch)
treebe8771313735697cab632ae3057216772a707825
parent05f44c2d858a1e7b13c90362c35fa86bdc4d5a24 (diff)
downloadguix-dce2cf311bc12dee4560329f53ccb53470d5793e.tar.gz
guix-dce2cf311bc12dee4560329f53ccb53470d5793e.zip
git: 'reference-available?' recognizes 'tag-or-commit'.
* guix/git.scm (reference-available?): Handle 'tag-or-commit' with a 40-digit hex string.
-rw-r--r--guix/git.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/git.scm b/guix/git.scm
index 719af950ad..dc2ca1be84 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -36,7 +36,7 @@
#:use-module (guix sets)
#:use-module ((guix diagnostics) #:select (leave warning))
#:use-module (guix progress)
- #:autoload (guix swh) (swh-download)
+ #:autoload (guix swh) (swh-download commit-id?)
#:use-module (rnrs bytevectors)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
@@ -342,7 +342,8 @@ dynamic extent of EXP."
"Return true if REF, a reference such as '(commit . \"cabba9e\"), is
definitely available in REPOSITORY, false otherwise."
(match ref
- (('commit . commit)
+ ((or ('commit . commit)
+ ('tag-or-commit . (? commit-id? commit)))
(let ((len (string-length commit))
(oid (string->oid commit)))
(false-if-git-not-found