diff mbox series

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

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

Commit Message

Attila Lendvai July 29, 2023, 12:04 p.m. UTC
---

i was missing this. maybe you will find it useful, too.

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


base-commit: e43cbeafd1b632f39b08b3644af5230d5350a656
prerequisite-patch-id: 6793c8ad24215c5f14ce71a4741fff5f6ccd7eeb

Comments

Simon Tournier Aug. 16, 2023, 4:41 p.m. UTC | #1
Hi,

On Sat, 29 Jul 2023 at 14:04, Attila Lendvai <attila.lendvai@gmail.com> wrote:

> -                             (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)
> +                             (channel-branch channel))

That’s nice but I see a potential confusion when using “guix pull
--commit” or “guix time-machine --commit”.  Well, from ’channel-list’ in
(guix scripts pull), if the option --commit is provided then the branch
is set to #f.  Therefore, it would display “, branch #f...” which could
be misleading.

Somehow, this display should be conditional depending on if
’channel-branch’ is not #f.  WDYT?

Cheers,
simon
diff mbox series

Patch

diff --git a/guix/channels.scm b/guix/channels.scm
index 681adafc6c..731e0d90d3 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -537,9 +537,11 @@  (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)
+                             (channel-branch channel))
                      (let* ((current (current-commit (channel-name channel)))
                             (instance
                              (latest-channel-instance store channel