On Wed, Jun 19, 2019 at 04:58:50PM +0700, Nguyễn Thái Ngọc Duy wrote: > This is probably just my itch. Every time I have to do something with > the index, I need to add a little bit code here, a little bit there to > get a better "view" of the index. > > This solves it for me. It allows me to see pretty much everything in the > index (except really low detail stuff like pathname compression). It's > readable by human, but also easy to parse if you need to do statistics > and stuff. You could even do a "diff" between two indexes. > > I'm not really sure if anybody else finds this useful. Because if not, > I guess there's not much point trying to merge it to git.git just for a > single user. Maintaining off tree is still a pain for me, but I think > I can manage it. I don't have any particular use for this, but I am all in favor of tools that make it easier to access and analyze information kept in our on-disk formats (some of this is available via --debug, I think, but AFAIK most of the extension bits are not). And I'd rather see something like JSON than inventing yet another ad-hoc output format. I think your warning in the manpage that this is for debugging is fine, as it does not put us on the hook for maintaining the feature nor its format forever. We might want to call it "--debug=json" or something, though, in case we do want real stable json support later (though of course we would be free to steal the option then, since we're making no promises). -Peff