Thread (1 message) 1 message, 1 author, 2025-08-17

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

From: Junio C Hamano <hidden>
Date: 2025-08-17 22:54:25

Ron Ziroby Romero [off-list ref] 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 ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help