aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain GARBAGE <romain.garbage@inria.fr>2025-04-24 10:19:58 +0200
committerLudovic Courtès <ludo@gnu.org>2025-04-25 20:25:27 +0200
commitf3021149a825c1e9fe5e06ddfed87d5a44372f28 (patch)
treece0ec7edcb074d463c498e2fb260b1948c37719c
parent1a0f9a3689c346f143c2efb929198a22eba1e0f5 (diff)
downloadguix-f3021149a825c1e9fe5e06ddfed87d5a44372f28.tar.gz
guix-f3021149a825c1e9fe5e06ddfed87d5a44372f28.zip
channels: Add symref support.
* guix/channels.scm (channel-reference): Add symref support. Change-Id: Iea93aa22479ec21900af947c4df79a3ed97b5e62 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Modified-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--guix/channels.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/channels.scm b/guix/channels.scm
index 4700f7a45d..7a02d24a84 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -250,7 +250,11 @@ could be found at DIRECTORY or one of its ancestors."
"Return the \"reference\" for CHANNEL, an sexp suitable for
'latest-repository-commit'."
(match (channel-commit channel)
- (#f `(branch . ,(channel-branch channel)))
+ (#f (let ((branch (channel-branch channel)))
+ (if (and (string? branch)
+ (string-prefix? "refs/" branch))
+ `(symref . ,branch)
+ `(branch . ,branch))))
(commit `(tag-or-commit . ,(channel-commit channel)))))
(define sexp->channel-introduction