git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ron Ziroby Romero <ziroby@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFE] Add JSON output to git log commands
Date: Sun, 17 Aug 2025 15:54:22 -0700	[thread overview]
Message-ID: <xmqqqzx9k19d.fsf@gitster.g> (raw)
In-Reply-To: <CAGW8g7mV6az3ybYf3uzHYQTGLDwc34eebZnha1EQ3Sb6B8E-fQ@mail.gmail.com> (Ron Ziroby Romero's message of "Sun, 17 Aug 2025 21:17:46 +0100")

Ron Ziroby Romero <ziroby@gmail.com> writes:

> ## Design outline
>
> * Add a `PRETTY_JSON` constant.
> * Create a pretty-json.c file to output JSON log information
> * Modify pretty.c to call pretty-json to output JSON when the flag is set.
> * Use existing utility functions written in the existing source to
> output the JSON.

Is this limited to only giving another serialization format to what
is in `git cat-file commit` output for sequence of commits, which is
what I see in the example below?

Within that limited scope, I am curious what your plan is to deal
with header elements like "encoding", "gpgsig", "mergetag", etc.

And outside that scope, I am not sure what the most useful output
would be for things outside what is in each of the commit object.
E.g., various "diff" output, e.g. --stat, -p, --name-status...

Leaving that outside the scope would be a very clean way out to
avoid confusing design issues ;-)

      parent reply	other threads:[~2025-08-17 22:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-17 20:17 [RFE] Add JSON output to git log commands Ron Ziroby Romero
2025-08-17 21:09 ` Kristoffer Haugsbakk
2025-08-17 21:28   ` D. Ben Knoble
2025-08-17 22:11 ` brian m. carlson
2025-08-17 22:54 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqqzx9k19d.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ziroby@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).