aboutsummaryrefslogtreecommitdiff
path: root/guix/channels.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-01-23 18:21:44 +0100
committerLudovic Courtès <ludo@gnu.org>2023-01-23 23:23:07 +0100
commite6c01420dbe88fc948c0b6755edbdc6a2ad18fe0 (patch)
tree9a6a1534bb6e064cb25ec332c1d9365cd2a3cdb3 /guix/channels.scm
parenta8792bc7962c3aeaba66ed810901fcfd96ed3603 (diff)
downloadguix-e6c01420dbe88fc948c0b6755edbdc6a2ad18fe0.tar
guix-e6c01420dbe88fc948c0b6755edbdc6a2ad18fe0.tar.gz
channels: 'channel->code' emits 'channel' field only when necessary.
* guix/channels.scm (channel->code): Emit 'commit' field only when it is true.
Diffstat (limited to 'guix/channels.scm')
-rw-r--r--guix/channels.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/channels.scm b/guix/channels.scm
index d84228c47e..40cbc4bb3a 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
@@ -1057,7 +1057,9 @@ true, include its introduction, if any."
(name ',(channel-name channel))
(url ,(channel-url channel))
(branch ,(channel-branch channel))
- (commit ,(channel-commit channel))
+ ,@(if (channel-commit channel)
+ `((commit ,(channel-commit channel)))
+ '())
,@(if intro
`((introduction (make-channel-introduction
,(channel-introduction-first-signed-commit intro)