Re: [PATCH v2] config: add '--sources' option to print the source of a config value
- From
Sebastian Schuberth <sschuberth@gmail.com>
- Date
- Feb 10, 2016, 15:33 UTC
- Message-ID
- <CAHGBnuMMN_xEVDJ_dqWgL6QCGK08hy=ggg=6PzkSCinHr=QeFg@mail.gmail.com>
- In-Reply-To
- <20160210125429.GA8078@sigill.intra.peff.net>
On Wed, Feb 10, 2016 at 1:54 PM, Jeff King <peff@peff.net> wrote:
Show 6 quoted lines
>> +--sources:: >> + Augment the output of all queried config options with the >> + source type (file, stdin, blob, cmd) and the actual source >> + (config file path, ref, or blob id if applicable). > > I think something like "cmdline" might be more descriptive than "cmd".
I agree "cmdline" is better than "cmd".
Show 19 quoted lines
> So the format here is like: > > file\t<filename>\t<value...> > blob\t<blob>\t<value...> > stdin\t\t<value...> > cmd\t\t<value...> > > where two of the prefixes have nothing in the second slot. I expected > something more like: > > file:<filename>\t</value...> > blob:<blob>\t<value...> > stdin\t<value...> > cmd\t<value...> > > with a single delimited slot for the source, which can then be broken > down further if desired. I can't think of any reason to prefer one over > the other rather than personal preference, though. They can both be > parsed unambiguously.
I also would have expected sopme like the latter, except that I'd also expect a colon after "stdin" and "cmd" (or "cmdline", as said above). I.e. the colon should be part of the prefix to mark it as such.
-- Sebastian Schuberth