]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ob/core-attributesfile-in-repository' into next
authorJunio C Hamano <gitster@pobox.com>
Fri, 27 Feb 2026 23:16:30 +0000 (15:16 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Feb 2026 23:16:30 +0000 (15:16 -0800)
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

12 files changed:
1  2 
builtin/backfill.c
builtin/checkout.c
builtin/clone.c
builtin/grep.c
builtin/sparse-checkout.c
builtin/submodule--helper.c
builtin/worktree.c
environment.c
environment.h
repository.c
repository.h
wt-status.c

Simple merge
Simple merge
diff --cc builtin/clone.c
Simple merge
diff --cc builtin/grep.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc environment.c
index 2764d8f4817c2acaf507994efef5bb28b29be330,1bc3adb75bac20bbdce7309197575a8337f2d919..fc3ed8bb1c7a66ae9be342c04700478a9af7f19d
@@@ -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 540e0a7f6dd51fc249ff8b75d4d73c6b45e44887,4bfd79875728eebbabac29ab936012d916a987ed..123a71cdc8d14ed3386b925bac2827ff52f554b2
@@@ -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.c
Simple merge
diff --cc repository.h
index 8f057a241d640b742e64d0a389189108190543a4,9717e45000740d139ed4c7b1fb088a63758daa28..7830eb7d4bc4bb058f0c20b23545775033d4ee60
@@@ -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;
diff --cc wt-status.c
Simple merge