Repository navigation
fix(config): Fix scoped config lookups and resolve get() across all scopes - #2037
Merged
Merged
Conversation
Wikiwix
force-pushed
the
fix/config-scope-flags
branch
2 times, most recently
from
November 16, 2026 19:51
f8652f3 to
60ddeee
Compare
`get_global` and `get_local` appended `--global`/`--local` after the key, so `git config --get <key> --global` treated the flag as a value pattern and every lookup came back empty. This broke e.g. `core.commentChar` in the commit and rebase editors. - Use the existing `global`/`_local` flags so they precede `--get`. - Add `--includes` so `include` and `includeIf` sections are honored, which `--global`/`--local` skip by default. - Tag `get_local` entries with the `local` scope so `ConfigEntry:refresh()` reads the right file. - Add specs for global, local and `includeIf` lookups.
`M.get()` only consulted `--local` and `--global`, so values set only in the system config, worktree config or via `git -c` / `GIT_CONFIG_*` were treated as unset, whereas before aa99b44 the unscoped global fallback picked them up. - Look up the key without a scope and with `--show-scope`, so git resolves precedence and includes itself and reports where the value came from. - Let `ConfigEntry:refresh()` re-resolve entries from scopes other than `local`/`global`. - Add specs for local precedence, system config, environment overrides and missing keys.
Wikiwix
force-pushed
the
fix/config-scope-flags
branch
from
November 16, 2026 19:54
60ddeee to
eaf2f50
Compare
Contributor
Author
|
I fixed the type annotation oversights. |
Member
|
thanks :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix issues introduced in aa99b44:
includeIfconfigsgit -cor env varsConfigEntry:refresh()always re-resolve viaM.get(), so popup values don't go stale after a local write shadows a global onemaster(This file is fully written by AI, I can remove it if that is preferred)