From: Okhuomon Ajayi Date: Wed, 21 Oct 2026 21:20:56 GMT Subject: Re: [Outreachy PATCH] environment: move commit_encoding into repo_config_values Message-ID: In-Reply-To: On Wed, Oct 21, 2026 at 9:44 PM Junio C Hamano wrote: > I do not think it is worth contaminating the repository configuration > with it. Instead, shouldn't we allow the functions that use this > global to take a "const char *git_commit_encoding" parameter (instead > of a 'repository_config' or a 'repository' structure) and pass it > through? The callers may need to query the config subsystem to learn > the appropriate encoding for the repository they are working with > before calling these functions, but there is no need to pass the > entire repository structure down the call graph. Thanks, that makes sense. So for v2, write_commit_tree() and commit_tree_extended() would both take the encoding as a "const char *" parameter. The callers of commit_tree_extended() would look up i18n.commitEncoding from the config and pass it in, and commit_tree() would do the same for its own callers. Nothing would be added to repo_config_values. Does that match what you had in mind?