GNU bug report logs - #78030
[PATCH 0/2] Symref support in channels

Previous Next

Package: guix-patches;

Reported by: Romain GARBAGE <romain.garbage <at> inria.fr>

Date: Thu, 24 Apr 2025 08:19:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 78030 <at> debbugs.gnu.org (full text, mbox):

From: Romain GARBAGE <romain.garbage <at> inria.fr>
To: 78030 <at> debbugs.gnu.org
Cc: ludovic.courtes <at> inria.fr, Romain GARBAGE <romain.garbage <at> inria.fr>
Subject: [PATCH 1/2] guix: channels: Add symref support.
Date: Thu, 24 Apr 2025 10:19:58 +0200
* guix/channels.scm (channel-reference): Add symref support.

Change-Id: Iea93aa22479ec21900af947c4df79a3ed97b5e62
---
 guix/channels.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/guix/channels.scm b/guix/channels.scm
index 4700f7a45d..72450da395 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -250,7 +250,13 @@ (define (channel-reference channel)
   "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)))
+               (cond
+                ((and (string? branch)
+                      (string-prefix? "refs/"
+                                      branch))
+                 `(symref . ,branch))
+                (#t `(branch . ,branch)))))
     (commit  `(tag-or-commit . ,(channel-commit channel)))))
 
 (define sexp->channel-introduction

base-commit: b12d44dd5e35ac236bf3fbb5619b9c8c2f42c902
-- 
2.49.0





This bug report was last modified 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.