From: Junio C Hamano Date: Thu, 5 Mar 2026 18:04:48 +0000 (-0800) Subject: Merge branch 'ob/core-attributesfile-in-repository' X-Git-Url: https://www.git.kevux.org/?a=commitdiff_plain;h=db227bce2224b55b11954a5f292a0b035b7d9279;p=rit Merge branch 'ob/core-attributesfile-in-repository' The core.attributesfile is intended to be set per repository, but were kept track of by a single global variable in-core, which has been corrected by moving it to per-repository data structure. * ob/core-attributesfile-in-repository: environment: move "branch.autoSetupMerge" into `struct repo_config_values` environment: stop using core.sparseCheckout globally environment: stop storing `core.attributesFile` globally --- db227bce2224b55b11954a5f292a0b035b7d9279 diff --cc environment.c index 2764d8f481,1bc3adb75b..fc3ed8bb1c --- a/environment.c +++ b/environment.c @@@ -301,9 -321,11 +298,11 @@@ next_name return (current & ~negative) | positive; } -static int git_default_core_config(const char *var, const char *value, - const struct config_context *ctx, void *cb) +int git_default_core_config(const char *var, const char *value, + const struct config_context *ctx, void *cb) { + struct repo_config_values *cfg = repo_config_values(the_repository); + /* This needs a better name */ if (!strcmp(var, "core.filemode")) { trust_executable_bit = git_config_bool(var, value); diff --cc environment.h index 540e0a7f6d,4bfd798757..123a71cdc8 --- a/environment.h +++ b/environment.h @@@ -107,9 -119,9 +120,11 @@@ const char *strip_namespace(const char int git_default_config(const char *, const char *, const struct config_context *, void *); +int git_default_core_config(const char *var, const char *value, + const struct config_context *ctx, void *cb); + void repo_config_values_init(struct repo_config_values *cfg); + /* * TODO: All the below state either explicitly or implicitly relies on * `the_repository`. We should eventually get rid of these and make the diff --cc repository.h index 72a5e9d410,9717e45000..9ad6520c37 --- a/repository.h +++ b/repository.h @@@ -148,13 -149,11 +149,16 @@@ struct repository /* Repository's compatibility hash algorithm. */ const struct git_hash_algo *compat_hash_algo; + /* Repository's config values parsed by git_default_config() */ + struct repo_config_values config_values_private_; + /* Repository's reference storage format, as serialized on disk. */ enum ref_storage_format ref_storage_format; + /* + * Reference storage information as needed for the backend. This contains + * only the payload from the reference URI without the schema. + */ + char *ref_storage_payload; /* A unique-id for tracing purposes. */ int trace2_repo_id;