All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tian Yuchen <cat@malon.dev>
To: git@vger.kernel.org
Cc: ps@pks.im, cirnovskyv@gmail.com, Tian Yuchen <cat@malon.dev>
Subject: [PATCH v5 0/4] environment: migrate 'trust_executable_bit' and 'has_symlinks' into 'repo_config_values'
Date: Wed, 15 Jul 2026 11:54:57 +0800	[thread overview]
Message-ID: <20260715035501.48271-1-cat@malon.dev> (raw)
In-Reply-To: <20260619162105.648495-1-cat@malon.dev>

This series moves 'trust_executable_bit' and 'has_symlinks' into
'struct repo_config_values' to tie them to the specific repository
instance they were read from. Eager parsing is maintained because
these two flags are heavily consulted in hot paths.

Note: 'repo_config_values()' still does not support any struct
repository other than the_repository due to how deeply these flags
are accessed. In other words, this series of patches is laying
the groundwork for the eventual elimination of the_repository.

Previous related work:

[PATCH 2/6] config: add trust_executable_bit to global config [1]
[PATCH] Refactor 'trust_executable_bit' to repository-scoped setting [2]
(This previous attempt was unsuccessful because the target location
selected was 'struct repo_settings', which our analysis indicated
was not the optimal choice. For further details, please see: [3])

[PATCH 5/6] config: move has_symlinks [4]

RFC:

 - I wonder if there is a better way to deal with compat/mingw.c in
 commit 4/4. Is it possible not to introduce a fallback variable?

Change since V4:

 - the migration of has_symlinks is back [5], as a commit 4/4;

 - drop the comment for repo_executable_bit();

 - do not always pass the_repository to the getters. Use 'repo' when possible. 

Thanks!

[1] https://lore.kernel.org/git/837b5360b40f992351f489a0ae05fedf49884c6e.1685716420.git.gitgitgadget@gmail.com/
[2] https://lore.kernel.org/git/20260301190017.53539-1-dronarajgyawali@gmail.com/
[3] https://lore.kernel.org/git/xmqq1pht6nyx.fsf@gitster.g/
[4] https://lore.kernel.org/git/a154008619790f7a60f2bba91db7b0fe29e67e1a.1685716420.git.gitgitgadget@gmail.com/
[5] https://lore.kernel.org/git/xmqq7bokebct.fsf@gitster.g/

Tian Yuchen (4):
  read-cache: remove redundant extern declarations
  read-cache: move 'ce_mode_from_stat()' to 'read-cache.c'
  environment: move trust_executable_bit into repo_config_values
  environment: move has_symlinks into repo_config_values

 apply.c        |  4 ++--
 combine-diff.c |  2 +-
 compat/mingw.c |  7 ++++---
 entry.c        |  2 +-
 environment.c  | 28 ++++++++++++++++++++++++----
 environment.h  |  9 +++++++--
 read-cache.c   | 33 ++++++++++++++++++++++++++-------
 read-cache.h   | 16 ++--------------
 8 files changed, 67 insertions(+), 34 deletions(-)

-- 
2.43.0


  parent reply	other threads:[~2026-07-15  3:55 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-30 16:05 [PATCH v1 0/4] environment.c: migrate 'trust_executable_bit' into 'repo_config_values' Tian Yuchen
2026-05-30 16:05 ` [PATCH v1 1/4] read-cache: remove redundant extern declarations Tian Yuchen
2026-05-30 16:05 ` [PATCH v1 2/4] read-cache: move 'ce_mode_from_stat()' to 'read-cache.c' Tian Yuchen
2026-06-04  6:47   ` Patrick Steinhardt
2026-06-10  8:30     ` Tian Yuchen
2026-05-30 16:05 ` [PATCH v1 3/4] environment: move 'trust_executable_bit' into repo_config_values Tian Yuchen
2026-05-30 18:02   ` Christian Couder
2026-05-30 23:17   ` Junio C Hamano
2026-06-01 10:10     ` Tian Yuchen
2026-06-01 18:03       ` Tian Yuchen
2026-06-09 13:45         ` Junio C Hamano
2026-05-30 16:05 ` [PATCH v1 4/4] read-cache: pass 'istate' to stat/mode helper functions Tian Yuchen
2026-05-30 18:14   ` Christian Couder
2026-06-10  9:36 ` [PATCH v2 0/3] environment: migrate 'trust_executable_bit' into 'repo_config_values' Tian Yuchen
2026-06-10  9:36   ` [PATCH v2 1/3] read-cache: remove redundant extern declarations Tian Yuchen
2026-06-10  9:36   ` [PATCH v2 2/3] read-cache: move 'ce_mode_from_stat()' to 'read-cache.c' Tian Yuchen
2026-06-12  7:43     ` Christian Couder
2026-06-10  9:36   ` [PATCH v2 3/3] environment: move trust_executable_bit into repo_config_values Tian Yuchen
2026-06-11  2:58     ` Tian Yuchen
2026-06-12  7:48     ` Christian Couder
2026-06-12 15:21       ` Junio C Hamano
2026-06-12 16:05   ` [PATCH v3 0/3] environment: migrate 'trust_executable_bit' into 'repo_config_values' Tian Yuchen
2026-06-12 16:05     ` [PATCH v3 1/3] read-cache: remove redundant extern declarations Tian Yuchen
2026-06-12 16:05     ` [PATCH v3 2/3] read-cache: move 'ce_mode_from_stat()' to 'read-cache.c' Tian Yuchen
2026-06-12 16:05     ` [PATCH v3 3/3] environment: move trust_executable_bit into repo_config_values Tian Yuchen
2026-06-19 16:21     ` [PATCH v4 0/3] environment: migrate 'trust_executable_bit' into 'repo_config_values' Tian Yuchen
2026-06-19 16:21       ` [PATCH v4 1/3] read-cache: remove redundant extern declarations Tian Yuchen
2026-06-19 16:21       ` [PATCH v4 2/3] read-cache: move 'ce_mode_from_stat()' to 'read-cache.c' Tian Yuchen
2026-06-19 16:21       ` [PATCH v4 3/3] environment: move trust_executable_bit into repo_config_values Tian Yuchen
2026-06-29 20:55       ` [PATCH v4 0/3] environment: migrate 'trust_executable_bit' into 'repo_config_values' Junio C Hamano
2026-07-15  3:28         ` Tian Yuchen
2026-07-15  3:54       ` Tian Yuchen [this message]
2026-07-15  3:54         ` [PATCH v5 1/4] read-cache: remove redundant extern declarations Tian Yuchen
2026-07-15  3:54         ` [PATCH v5 2/4] read-cache: move 'ce_mode_from_stat()' to 'read-cache.c' Tian Yuchen
2026-07-15  3:55         ` [PATCH v5 3/4] environment: move trust_executable_bit into repo_config_values Tian Yuchen
2026-07-15  3:55         ` [PATCH v5 4/4] environment: move has_symlinks " Tian Yuchen
2026-07-15  6:21           ` Christian Couder
2026-07-15 17:18             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260715035501.48271-1-cat@malon.dev \
    --to=cat@malon.dev \
    --cc=cirnovskyv@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.