Skip to content

environment: migrate more variables #2#13

Open
malon7782 wants to merge 2 commits into
masterfrom
abbrev
Open

environment: migrate more variables #2#13
malon7782 wants to merge 2 commits into
masterfrom
abbrev

Conversation

@malon7782

@malon7782 malon7782 commented Jul 24, 2026

Copy link
Copy Markdown
Owner

minimum_abbrev
default_abbrev
pack_size_limit_cfg

Move the global 'minimum_abbrev' and 'default_abbrev' configurations
into the repository-specific 'repo_config_values'
struct.

To ensure code readability, the getter functions
'repo_minimum_abbrev()' and 'repo_default_abbrev()' have been introduced.
The existing MINIMUM_ABBREV and DEFAULT_ABBREV macros are redefined to
the corresponding getters.

Additionally, some subsystems forbid the direct use of 'the_repository'
and must pass their own local 'repo'. Let the getters explicitly intercept
these instances.

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

We do not introduce a getter for it because the callers are
limited.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Mentored-by: Olamide Caleb Bello <belkid98@gmail.com>
Signed-off-by: Tian Yuchen <cat@malon.dev>
@malon7782 malon7782 changed the title environment: migrate minimum_abbrev and default_abbrev environment: migrate more variables #2 Jul 25, 2026
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