Thread (1 message) 1 message, 1 author, 2025-09-22

Re: [PATCH v3 4/5] builtin/config: special-case retrieving colors without a key

From: Junio C Hamano <hidden>
Date: 2025-09-22 16:29:13

Patrick Steinhardt [off-list ref] writes:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help