Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 24, 2019, 09:35 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1906241133080.44@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20190621205238.GD25874@sigill.intra.peff.net>
Hi Peff & Junio,
On Fri, 21 Jun 2019, Jeff King wrote:
Show 22 quoted lines
> On Fri, Jun 21, 2019 at 08:10:58AM -0700, Junio C Hamano wrote: > > > Duy Nguyen <pclouds@gmail.com> writes: > > > > > 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. > > I should have read the whole thread before responding. I made a similar > comment to Dscho, so I guess that is now two of us. :)
It is a bit of a chicken-and-egg problem. You want the format to stabilize. But you also don't want to commit to one final format. And you choose as option name a deliberately discouraging one, deterring the (third-party application) developers who could most help you evolve the format to a sensible and useful stable version.
Ciao, Dscho