Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json
- From
Jeff King <peff@peff.net>
- Date
- Jun 21, 2019, 20:48 UTC
- Message-ID
- <20190621204814.GB25874@sigill.intra.peff.net>
- In-Reply-To
- <CACsJy8AYw1QLjWALUNr7hSZemWyTSG0U8Fc_TH=9HNR-LcygTg@mail.gmail.com>
On Fri, Jun 21, 2019 at 03:37:45PM +0700, Duy Nguyen wrote:
Show 9 quoted lines
> On Thu, Jun 20, 2019 at 2:17 AM Jeff King <peff@peff.net> wrote: > > 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, > > Hmm.. does it mean we make --debug PARSE_OPT_OPTARG? In other words, > "--debug" still means "text", --debug=json is obvious, but "--debug > json" means "text" debug with pathspec "json". Which is really > horrible in my opinion.
Yeah, that's the nature of OPTARG. ;)
> Or is it ok to just make the argument mandatory? That would be a > behavior change, but I suppose --debug is a thing only we use and > could still be a safe thing to do...
Yeah, I think that would be perfectly fine (or you could just call it --debug-json as a new option, if you didn't want to make people do --debug=text for the existing behavior).
-Peff