Re: How to undo previously set configuration? (again)
- From
Jeff King <peff@peff.net>
- Date
- May 1, 2019, 21:09 UTC
- Message-ID
- <20190501210944.GA15902@sigill.intra.peff.net>
- In-Reply-To
- <CACsJy8CSPBbxrJm1sh4a+f_B03MFXxDXSrOvb6yFCRa4Qa2wMQ@mail.gmail.com>
On Wed, May 01, 2019 at 07:32:20PM +0700, Duy Nguyen wrote:
Show 8 quoted lines
> > We also provide no way in "git config" to properly interpret a > > value. E.g. does a "user.email" showing up twice for me mean I have two > > E-Mails at the same time, or does the last one win? > > Actually --get knows this. Single-valued options can be handled > correctly quite easily. It's --get-all (or rather, the future > --get-multi because we can't change --get-all's behavior) which can't > interpret values because there's no standardized way of doing it.
Right. We need a hint from the caller about how they expect us to interpret the values. And I agree we should probably introduce a new verb instead of modifying --get-all, which some callers might be expecting to do their own list processing.
Likewise in the C code. We probably want to leave existing callers of git_config_get_value_multi() alone, and give them a new git_config_get_string_list() or something.
-Peff