unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#59254] [PATCH] scripts: describe: Add branch information to json output.
@ 2022-11-13 21:31 jgart via Guix-patches via
  2022-11-13 21:35 ` [bug#59254] [PATCH v2] " jgart via Guix-patches via
  0 siblings, 1 reply; 4+ messages in thread
From: jgart via Guix-patches via @ 2022-11-13 21:31 UTC (permalink / raw)
  To: 59254; +Cc: jgart

* guix/scripts/describe.scm (channel->json): Add branch information.
---
 guix/scripts/describe.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm
index 0c310e3da8..dbc040c54d 100644
--- a/guix/scripts/describe.scm
+++ b/guix/scripts/describe.scm
@@ -119,6 +119,7 @@ (define (channel->json channel)
    (let ((intro (channel-introduction channel)))
      `((name . ,(channel-name channel))
        (url . ,(channel-url channel))
+       (branch . ,(channel-branch channel))
        (commit . ,(channel-commit channel))
        ,@(if intro
              `((introduction
-- 
2.38.1





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#59254] [PATCH v2] scripts: describe: Add branch information to json output.
  2022-11-13 21:31 [bug#59254] [PATCH] scripts: describe: Add branch information to json output jgart via Guix-patches via
@ 2022-11-13 21:35 ` jgart via Guix-patches via
  2022-11-19 18:42   ` bug#59254: [PATCH] " Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: jgart via Guix-patches via @ 2022-11-13 21:35 UTC (permalink / raw)
  To: 59254; +Cc: jgart

* guix/scripts/describe.scm (channel->json): Add branch information.

This patch adds branch information to the json output.

Here's an example of the output:

$ guix-shell  ./pre-inst-env guix describe -f json | jq
{
  "name": "guix",
  "url": "/home/jgart/dc2e8ad5-c818-41a4-ac33-198f11f868b2-guix/",
  "branch": "master",
  "commit": "a720eacc803d6e078ea07613ba5ab5ef59adcbb5",
  "introduction": {
    "commit": "9edb3f66fd807b096b48283debdcddccfea34bad",
    "signer": "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"
  }
}

v2 just adds my copyright statement at the top of the file.

all best,

jgart
---
 guix/scripts/describe.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm
index 0c310e3da8..e2233c78a5 100644
--- a/guix/scripts/describe.scm
+++ b/guix/scripts/describe.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2022 jgart <jgart@dismail.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -119,6 +120,7 @@ (define (channel->json channel)
    (let ((intro (channel-introduction channel)))
      `((name . ,(channel-name channel))
        (url . ,(channel-url channel))
+       (branch . ,(channel-branch channel))
        (commit . ,(channel-commit channel))
        ,@(if intro
              `((introduction
-- 
2.38.1





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#59254: [PATCH] scripts: describe: Add branch information to json output.
  2022-11-13 21:35 ` [bug#59254] [PATCH v2] " jgart via Guix-patches via
@ 2022-11-19 18:42   ` Ludovic Courtès
  2022-11-19 18:44     ` [bug#59254] " jgart via Guix-patches via
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2022-11-19 18:42 UTC (permalink / raw)
  To: jgart; +Cc: 59254-done

jgart <jgart@dismail.de> skribis:

> * guix/scripts/describe.scm (channel->json): Add branch information.

Applied, thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#59254] [PATCH] scripts: describe: Add branch information to json output.
  2022-11-19 18:42   ` bug#59254: [PATCH] " Ludovic Courtès
@ 2022-11-19 18:44     ` jgart via Guix-patches via
  0 siblings, 0 replies; 4+ messages in thread
From: jgart via Guix-patches via @ 2022-11-19 18:44 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 59254-done

On Sat, 19 Nov 2022 19:42:34 +0100 Ludovic Courtès <ludo@gnu.org> wrote:
> Applied, thanks!

Thanks for the review!

all best,

jgart




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-19 18:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-13 21:31 [bug#59254] [PATCH] scripts: describe: Add branch information to json output jgart via Guix-patches via
2022-11-13 21:35 ` [bug#59254] [PATCH v2] " jgart via Guix-patches via
2022-11-19 18:42   ` bug#59254: [PATCH] " Ludovic Courtès
2022-11-19 18:44     ` [bug#59254] " jgart via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).