Re: [PATCH v2 05/10] split-index.c: dump "link" extension as json
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 8, 2019, 17:58 UTC
- Message-ID
- <xmqqd0ikz9ut.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CACsJy8CZZAkcuN_hqp6YmMkhKs0ON6b-+Cyo+Q+Jk4zFh0Ve7w@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 9 quoted lines
> The command is to dump .git/index, not the shared one. And since this > is not a split index test, rather a (quite low-level) json dump test, > I did not bother to also dump the shared index, which should look like > a regular one. Producing a unified view in json might not be easy with > the current code because it's tied to file reading code, nearly stream > out json as we read the file, and split-index requires a post > processing step. I could contribute a python script or something to > combine shared/main index together. That way you can still see the > combined one, but we don't have to add/maintain more C code.
Well, such a post-processing is something external scripts shine at and exporting the internal data in json format is exactly to support these scripts, so it may make a good first test case ;-)