Open
Conversation
To pave the way for reducing the global state tied to commit encoding in a subsequent patch, functions like 'commit_tree()' and 'commit_tree_extended()' must be able to access a repository instance. Plumb the 'struct repository' pointer down the call chain for these APIs. For built-ins or subsystems already dependent on global state (e.g., 'notes_cache_write()'), fallback to 'the_repository'. No functional changes are introduced in this preparatory step. Signed-off-by: Tian Yuchen <a3205153416@gmail.com>
To prepare for the elimination of the global state associated with 'log_output_encoding', functions responsible for formatting commit messages, such as 'pretty_print_commit()' and 'pp_commit_easy()', must be able to access a repository instance. Plumb the 'struct repository' pointer down the call chain for these APIs. Where no such context is readily available in built-ins or high-level functions, fallback to 'the_repository'. Signed-off-by: Tian Yuchen <a3205153416@gmail.com>
The global variables 'git_commit_encoding' and 'git_log_output_encoding'
prevent libification.
Migrate these variables into 'struct repository'. Note that these variables
are not migrated to 'repo_settings'. As user preferences, they must be parsed
eagerly to maintain immediate UX feedback.
While the core read and write APIs (updated in previous patches) now
utilize the 'struct repository' pointer, the config parsing step
('git_default_i18n_config') currently parses these values into
'the_repository', since safely plumbing a repository pointer through
the 'git_default_config' callback machinery is highly invasive due to
the diverse and custom structures currently passed via the 'void *cb'
parameter.
Signed-off-by: Tian Yuchen <a3205153416@gmail.com>
|
There is an issue in commit 196b272:
|
|
There is a merge commit in this Pull Request: Please rebase the branch and force-push. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.