Re: [PATCH v3 4/5] builtin/config: special-case retrieving colors without a key
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 22, 2025, 16:29 UTC
- Message-ID
- <xmqqo6r2v4bs.fsf@gitster.g>
- In-Reply-To
- <aNFJanpSY8wd8-b1@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 15 quoted lines
>> If we are willing to handle this as a special case anyway, I wonder >> if it can easily be arranged to take this as a(nother) special case. >> >> $ git config get --type=color --default="reset" >> >> I.e., instead of (or in addition to) "if the config key is empty", >> special case "if the config key is not given", which may be slightly >> more intuitive. >> >> But even without it, what is presented is a vast improvement enough >> ;-) > > We probably could, yeah. But it starts to become even weirder than it > already is, so I'd honestly just leave it as-is for now :) I doubt that > there's too many users out there that care about this anyway.
Yes, unless we can require "--default" to be spelled "--translate-this" only in that specific use case (which we don't want to), the keyless case would be even more strange than the empty key case, so I am happy with what we see in this series.
Thanks.