Re: [PATCH 1/8] ls-files: add --json to dump the index

2019-06-24 Thread Duy Nguyen
On Wed, Jun 19, 2019 at 8:03 PM Derrick Stolee wrote: > > - show_files(the_repository, &dir); > > - > > - if (show_resolve_undo) > > - show_ru_info(the_repository->index); > > + if (!show_json) { > > + show_files(the_repository, &dir); > > + > > + if

Re: [PATCH 1/8] ls-files: add --json to dump the index

2019-06-21 Thread Johannes Schindelin
Hi, On Wed, 19 Jun 2019, Derrick Stolee wrote: > On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote: > > > +--json:: > > + Dump the entire index content in JSON format. This is for > > + debugging purposes and the JSON structure may change from time > > + to time. > > + > > "...purposes and t

Re: [PATCH 1/8] ls-files: add --json to dump the index

2019-06-19 Thread Derrick Stolee
On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote: > So far we don't have a command to basically dump the index file out, > with all its glory details. Checking some info, for example, stat > time, usually involves either writing new code or firing up "xxd" and > decoding values by yourself. > > Th

Re: [PATCH 1/8] ls-files: add --json to dump the index

2019-06-19 Thread Ævar Arnfjörð Bjarmason
On Wed, Jun 19 2019, Nguyễn Thái Ngọc Duy wrote: > + die(_("--show-json cannot be used with other --show- options, > or --with-tree")); Should be --json, not --show-json, right? I assume --show-json is left over from an earlier version.

[PATCH 1/8] ls-files: add --json to dump the index

2019-06-19 Thread Nguyễn Thái Ngọc Duy
So far we don't have a command to basically dump the index file out, with all its glory details. Checking some info, for example, stat time, usually involves either writing new code or firing up "xxd" and decoding values by yourself. This --json is supposed to help that. It dumps the index in a hu