diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-09-12 13:30:24 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-12 10:15:44 -0700 |
| commit | 11dbb4ace3ac428574fadf6f7895f56aba9dca81 (patch) | |
| tree | ca7a3d3afd87150d5fb2f369a52fb97da6b829cb /environment.c | |
| parent | environment: stop storing "core.preferSymlinkRefs" globally (diff) | |
| download | git-11dbb4ace3ac428574fadf6f7895f56aba9dca81.tar.gz git-11dbb4ace3ac428574fadf6f7895f56aba9dca81.zip | |
environment: stop storing "core.warnAmbiguousRefs" globally
Same as the preceding commits, storing the "core.warnAmbiguousRefs"
value globally is misdesigned as this setting may be set per repository.
Move the logic into the repo-settings subsystem. The usual pattern here
is that users are expected to call `prepare_repo_settings()` before they
access the settings themselves. This seems somewhat fragile though, as
it is easy to miss and leads to somewhat ugly code patterns at the call
sites.
Instead, introduce a new function that encapsulates this logic for us.
This also allows us to change how exactly the lazy initialization works
in the future, e.g. by only partially initializing values as requested
by the caller.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/environment.c b/environment.c index 6805c7b01d..9dd000cda3 100644 --- a/environment.c +++ b/environment.c @@ -35,7 +35,6 @@ int minimum_abbrev = 4, default_abbrev = -1; int ignore_case; int assume_unchanged; int is_bare_repository_cfg = -1; /* unspecified */ -int warn_ambiguous_refs = 1; int warn_on_object_refname_ambiguity = 1; int repository_format_precious_objects; char *git_commit_encoding; |
