me
/
guix
Archived
1
0
Fork 0

git: 'reference-available?' recognizes 'tag-or-commit'.

* guix/git.scm (reference-available?): Handle 'tag-or-commit' with a
40-digit hex string.
master
Ludovic Courtès 2021-09-10 15:53:32 +02:00
parent 05f44c2d85
commit dce2cf311b
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 2 deletions

View File

@ -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