Thread (26 messages) flat view 26 messages, 4 authors, 26m ago

Re: [PATCH v4 2/3] advice: introduce advice scoping mechanism

From: Jeff King <hidden>
Date: 2026-09-10 19:05:15

On Thu, Sep 10, 2026 at 08:54:15PM +0300, Vsevolod Myalitsin wrote:
quoted
I'm really not sure why anybody would use those other flags, though (or
even --system, for that matter). After reading the thread again, I get
why we want "--global" for advice that only affects new repository
creation (like defaultBranchName), since otherwise it could never have
any effect. But why would you ever want --system?
I initially looked at Junio's suggestion and, based on his experience,
didn't argue with it, and then I didn't come back to that message. I
think the patch should contain not + enum config_scope scope_hint; but
+ bool is_global_hint;, since I myself can't find any scenarios where
advice should be disabled at the system level.
Yeah, it feels like handling arbitrary scopes is introducing all of
these extra questions. But all we really need is that original bool you
had. I think there's some YAGNI principle here, too. Later if somebody
comes along and really wants to advise the user to use "git config
--system", they can do the bool-to-scope conversion then. I'd be
surprised if that happens.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help