git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFE] Add JSON output to git log commands

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 17, 2025, 22:54 UTC
Message-ID
<xmqqqzx9k19d.fsf@gitster.g>
In-Reply-To
<CAGW8g7mV6az3ybYf3uzHYQTGLDwc34eebZnha1EQ3Sb6B8E-fQ@mail.gmail.com>
Ron Ziroby Romero <ziroby@gmail.com> writes:
Show 7 quoted lines
> ## 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 ;-)

Previous: brian m. carlson
Message 5 of 5 in “[RFE] Add JSON output to git log commands”
  1. Ron Ziroby RomeroAug 17, 2025
  2. Kristoffer HaugsbakkAug 17, 2025
  3. D. Ben KnobleAug 17, 2025
  4. brian m. carlsonAug 17, 2025
  5. Junio C HamanoAug 17, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.