aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-05-14 23:21:45 +0200
committerLudovic Courtès <ludo@gnu.org>2021-05-14 23:25:09 +0200
commit46eac03e720e9b21d225e2ec1c41299c09202d18 (patch)
tree914b635c29e045346e8f459ff7088f0375640719
parent67bf61255414115ffae0141df9dd3623bc742bff (diff)
downloadguix-46eac03e720e9b21d225e2ec1c41299c09202d18.tar.gz
guix-46eac03e720e9b21d225e2ec1c41299c09202d18.zip
swh: 'lookup-origin-revision' ignores partial visits.
* guix/swh.scm (lookup-origin-revision): Filter out visits with a status different from 'full.
-rw-r--r--guix/swh.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/swh.scm b/guix/swh.scm
index 3005323fd1..06d2957252 100644
--- a/guix/swh.scm
+++ b/guix/swh.scm
@@ -455,7 +455,11 @@ URL could not be found."
(match (lookup-origin url)
(#f #f)
(origin
- (match (filter visit-snapshot-url (origin-visits origin))
+ (match (filter (lambda (visit)
+ ;; Return #f if (visit-snapshot VISIT) would return #f.
+ (and (visit-snapshot-url visit)
+ (eq? 'full (visit-status visit))))
+ (origin-visits origin))
((visit . _)
(let ((snapshot (visit-snapshot visit)))
(match (and=> (find (lambda (branch)