diff mbox series

[bug#64931,v3] guix: pull: Also print the name of the branch.

Message ID 211349c1ec2a73efd21e349b2502b8d9e582d555.1708974191.git.attila@lendvai.name
State New
Headers show
Series [bug#64931,v3] guix: pull: Also print the name of the branch. | expand

Commit Message

Attila Lendvai Feb. 26, 2024, 7:03 p.m. UTC
From: Attila Lendvai <attila@lendvai.name>

* guix/channels.scm (latest-channel-instances): Also print the branch name,
when it's not #f.
---

v3: it has developed conflicts while waiting in the queue. rebased.

 guix/channels.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)


base-commit: bf17a01e06abc100651ed643f2d5c7fea07d37ba
diff mbox series

Patch

diff --git a/guix/channels.scm b/guix/channels.scm
index 1b07eb52210..2f6fabea998 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -544,9 +544,15 @@  (define* (latest-channel-instances store channels
              (loop rest previous-channels instances)
              (begin
                (format (current-error-port)
-                       (G_ "Updating channel '~a' from Git repository at '~a'...~%")
+                       (G_ "Updating channel '~a' from Git repository at \
+ '~a'~:[~;, branch '~a'~]...~%")
                        (channel-name channel)
-                       (channel-url channel))
+                       (channel-url channel)
+                       ;; Only conditionally print the branch name.  When
+                       ;; e.g. --commit is provided for channel-list in (guix
+                       ;; scripts pull), then the branch is set to #f.
+                       (channel-branch channel)
+                       (channel-branch channel))
                (let* ((current (current-commit (channel-name channel)))
                       (instance
                        (latest-channel-instance store channel