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 ;-)