mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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>
This commit is contained in:
parent
1a0f9a3689
commit
f3021149a8
1 changed files with 5 additions and 1 deletions
|
@ -250,7 +250,11 @@ could be found at DIRECTORY or one of its ancestors."
|
||||||
"Return the \"reference\" for CHANNEL, an sexp suitable for
|
"Return the \"reference\" for CHANNEL, an sexp suitable for
|
||||||
'latest-repository-commit'."
|
'latest-repository-commit'."
|
||||||
(match (channel-commit channel)
|
(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)))))
|
(commit `(tag-or-commit . ,(channel-commit channel)))))
|
||||||
|
|
||||||
(define sexp->channel-introduction
|
(define sexp->channel-introduction
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue