Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 21, 2019, 15:10 UTC
- Message-ID
- <xmqqd0j7km7x.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CACsJy8A=Vhwgv8cvs8s2f_aJ5W335s8CdqRQCDSFrdJu2j9fjw@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 5 quoted lines
> Considering the amount of code to output these, supporting multiple > formats would be a nightmare. I may be ok with versioning the output > so the tool know what format they need to deal with, but I'd rather > support just one version. For third parties wanting to dig deep, I > think libgit2 would be a much better fit.
Yeah, I think starting with --debug=json (or --debug-json) until we see some stability in the output and got comfortable to the idea of "version X" to mean what we output at that point, and then renaming it to "--json" with "version: 1" in the output stream so that third party can use it (and interpret it according to version 1 rules) is the way to go. Third-party tools are welcome to read --debug-json output as an early-adoption practice waiting for the real thing, but we do not want to be locked into a schema too eary before we are ready.
Thanks.