diff mbox series

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

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

Commit Message

Attila Lendvai Sept. 9, 2023, 8:48 p.m. UTC
* guix/channels.scm (latest-channel-instances): Also print the branch name.
---

v2: added conditional formatting to only print the branch name when it's
specified.

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


base-commit: e43cbeafd1b632f39b08b3644af5230d5350a656
diff mbox series

Patch

diff --git a/guix/channels.scm b/guix/channels.scm
index 681adafc6c..5b48d206c4 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -537,9 +537,15 @@  (define* (latest-channel-instances store channels
                    (values 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.  If
+                             ;; --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