Skip to content

environment: migrate minimum_abbrev and default_abbrev - #15

Open
malon7782 wants to merge 1 commit into
masterfrom
abbrev-real
Open

environment: migrate minimum_abbrev and default_abbrev#15
malon7782 wants to merge 1 commit into
masterfrom
abbrev-real

Conversation

@malon7782

Copy link
Copy Markdown
Owner

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.

Note:

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

The line above is in v1, but in fact we shouldn't set checks like repo != the_repository anymore,
according to what Junio said. The existing ones are for debugging.

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>
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