[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Sat, 15 Jul 2023 11:37:29 -0400 (EDT) |
branch: master
commit cafe905b01dade715f5c83b425f79c09dd8d8f24
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jul 14 15:05:49 2023 +0200
templates: Gracefully handle local file names as channel URLs.
* src/cuirass/templates.scm (commit-hyperlink): Gracefully handle local
file names where 'string->uri' returns #f.
---
src/cuirass/templates.scm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index 8a9a906..898f3f8 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -1234,11 +1234,13 @@ and BUILD-MAX are global minimal and maximal (stoptime,
rowid) pairs."
(define (commit-hyperlink url commit)
"Return, if possibly, a hyperlink for COMMIT of the repository at URL."
- (let* ((uri (string->uri url))
- (host (uri-host uri)))
- (match (assoc-ref %vcs-web-views host)
- (#f commit)
- ((link) `(a (@ (href ,(link url commit))) ,commit)))))
+ (match (string->uri url)
+ (#f commit)
+ (uri
+ (let ((host (uri-host uri)))
+ (match (assoc-ref %vcs-web-views host)
+ (#f commit)
+ ((link) `(a (@ (href ,(link url commit))) ,commit)))))))
(define (nearest-exact-integer x)
"Given a real number X, return the nearest exact integer, with ties going to
- master updated (17a306a -> ee8b6b2), Ludovic Courtès, 2023/07/15
- [no subject], Ludovic Courtès, 2023/07/15
- [no subject], Ludovic Courtès, 2023/07/15
- [no subject], Ludovic Courtès, 2023/07/15
- [no subject], Ludovic Courtès, 2023/07/15
- [no subject], Ludovic Courtès, 2023/07/15
- [no subject],
Ludovic Courtès <=
- [no subject], Ludovic Courtès, 2023/07/15
- [no subject], Ludovic Courtès, 2023/07/15
- [no subject], Ludovic Courtès, 2023/07/15