]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ty/migrate-trust-executable-bit' into seen
authorJunio C Hamano <gitster@pobox.com>
Wed, 3 Jun 2026 23:14:11 +0000 (08:14 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Jun 2026 23:14:11 +0000 (08:14 +0900)
The 'trust_executable_bit' (coming from 'core.filemode'
configuration) has been migrated into 'repo_config_values' to tie it
to a specific repository instance.

* ty/migrate-trust-executable-bit:
  read-cache: pass 'istate' to stat/mode helper functions
  environment: move 'trust_executable_bit' into repo_config_values
  read-cache: move 'ce_mode_from_stat()' to 'read-cache.c'
  read-cache: remove redundant extern declarations

1  2 
environment.c
environment.h

diff --cc environment.c
index ba2c60103ff51c5e50a6c0e08635c9a3453eead6,94f74f39e6a8e89fc01b8c44f245255863f96203..93dceb1f0c35e81ae1b727be0d712a27b7d6e70b
@@@ -41,7 -41,8 +41,6 @@@
  static int pack_compression_seen;
  static int zlib_compression_seen;
  
- int trust_executable_bit = 1;
 -int trust_ctime = 1;
 -int check_stat = 1;
  int has_symlinks = 1;
  int minimum_abbrev = 4, default_abbrev = -1;
  int ignore_case;
@@@ -716,13 -719,6 +715,14 @@@ void repo_config_values_init(struct rep
  {
        cfg->attributes_file = NULL;
        cfg->apply_sparse_checkout = 0;
+       cfg->trust_executable_bit = 1;
        cfg->branch_track = BRANCH_TRACK_REMOTE;
 +      cfg->trust_ctime = 1;
 +      cfg->check_stat = 1;
 +      cfg->zlib_compression_level = Z_BEST_SPEED;
 +      cfg->pack_compression_level = Z_DEFAULT_COMPRESSION;
 +      cfg->precomposed_unicode = -1; /* see probe_utf8_pathname_composition() */
 +      cfg->core_sparse_checkout_cone = 0;
 +      cfg->sparse_expect_files_outside_of_patterns = 0;
 +      cfg->warn_on_object_refname_ambiguity = 1;
  }
diff --cc environment.h
index 6f182869558395caeaf6f0595c331564ccf0d8c7,217d3d4d40bfb42dd64c7b24ec8dee79e4943abf..bbb2f62b6a3805b48aa718b55824ddf9e3494ceb
@@@ -90,17 -90,8 +90,18 @@@ struct repository
  struct repo_config_values {
        /* section "core" config values */
        char *attributes_file;
+       int trust_executable_bit;
        int apply_sparse_checkout;
 +      int trust_ctime;
 +      int check_stat;
 +      int zlib_compression_level;
 +      int pack_compression_level;
 +      int precomposed_unicode;
 +      int core_sparse_checkout_cone;
 +      int warn_on_object_refname_ambiguity;
 +
 +      /* section "sparse" config values */
 +      int sparse_expect_files_outside_of_patterns;
  
        /* section "branch" config values */
        enum branch_track branch_track;
@@@ -162,7 -159,8 +163,6 @@@ int is_bare_repository(void)
  extern char *git_work_tree_cfg;
  
  /* Environment bits from configuration mechanism */
- extern int trust_executable_bit;
 -extern int trust_ctime;
 -extern int check_stat;
  extern int has_symlinks;
  extern int minimum_abbrev, default_abbrev;
  extern int ignore_case;