import/cran: download: Accept optional REF argument.

* guix/import/cran.scm (download): Accept REF argument for git downloads.
This commit is contained in:
Ricardo Wurmus 2022-08-12 18:59:11 +02:00
parent f8f3cffedc
commit 8c620a6036
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC

@ -200,11 +200,11 @@ bioconductor package NAME, or #F if the package is unknown."
;; Little helper to download URLs only once.
(define download
(memoize
(lambda* (url #:key method)
(lambda* (url #:key method (ref '()))
(with-store store
(cond
((eq? method 'git)
(latest-repository-commit store url))
(latest-repository-commit store url #:ref ref))
((eq? method 'hg)
(call-with-temporary-directory
(lambda (dir)