Skip to content

environment: migrate trust_executable_bit (test)#2316

Open
malon7782 wants to merge 3 commits into
git:masterfrom
malon7782:environment-test
Open

environment: migrate trust_executable_bit (test)#2316
malon7782 wants to merge 3 commits into
git:masterfrom
malon7782:environment-test

Conversation

@malon7782
Copy link
Copy Markdown
Contributor

This commit series is currently for test use. Will refine associated descriptions once completed.

#2312

Tian Yuchen added 3 commits May 27, 2026 18:33
The 'read-cache.c' file already includes 'environment.h', which provides
the extern declarations for variables like 'trust_executable_bit' and
'has_symlinks'.

Remove the redundant extern declarations inside 'st_mode_from_ce()' to
clean up the code.

Mentored-by: Christian Couder <christian.couder@gamil.com>
Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Signed-off-by: Tian Yuchen <cat@malon.dev>
The ce_mode_from_stat() function is declared as a static inline function
in 'read-cache.h'. As we want to migrate configuration variables, this
helper function will need access to corresponding repository-specific
configuration logic.

Move the implementation to 'read-cache.c' to cleanly encapsulate its
dependencies.

Mentored-by: Christian Couder <christian.couder@gamil.com>
Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Signed-off-by: Tian Yuchen <cat@malon.dev>
Move the global 'trust_executable_bit' configuration into the
repository-specific 'repo_config_values' struct.

For now, associated functions in read-cache.c access this configuration
by explicitly falling back to 'the_repository'.

Mentored-by: Christian Couder <christian.couder@gamil.com>
Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Signed-off-by: Tian Yuchen <cat@malon.dev>
@gitgitgadget-git
Copy link
Copy Markdown

There is an issue in commit 87e5acf:
read-cache: pass 'istate' to stat/mode helper functions

  • Lines in the body of the commit messages should be wrapped between 60 and 76 characters.
    Indented lines, and lines without whitespace, are exempt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant