git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [Outreachy PATCH] environment: move commit_encoding into repo_config_values

From
OAOkhuomon Ajayi <okhuomonajayi54@gmail.com>
Date
Oct 21, 2026, 21:20 UTC
Message-ID
<CAFpMFfCZdz4WLcwJFefXTQ1v_g+mgFQOHxzkf0aZoPqTz3o-=A@mail.gmail.com>
In-Reply-To
<xmqq33tyn5qi.fsf@gitster.g>
On Wed, Oct 21, 2026 at 9:44 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> 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?
Previous: Junio C Hamano
Message 3 of 3 in “environment: move commit_encoding into repo_config_values”
  1. environment: move commit_encoding into repo_config_valuesOkhuomon Ajayi, Oct 21, 2026
  2. Junio C HamanoOct 21, 2026
  3. Okhuomon AjayiOct 21, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.