From: Pablo Sabater Date: Sat, 11 Jul 2026 15:24:12 GMT Subject: Re: [PATCH v9 0/9] migrate more variables into repo_config_values Message-ID: In-Reply-To: <20260709161145.13349-1-cat@malon.dev> On Thu Jul 9, 2026 at 6:11 PM CEST, Tian Yuchen wrote: > Hi everyone, > > This patch series continues the ongoing libification effort by migrating > a batch of global configuration variables into struct repo_config_values. > > What does this series do: > > infrastructure & strings (commits 1-6): > Introduce 'repo_config_values_clear()' to manage the lifecycle > of heap-allocated configuration strings. This infrastructure is utilized > to migrate string variables, including 'excludes_file', 'apply' whitespace > configs, and external programs including 'editor', 'pager', 'askpass'. > > enums (commits 7-9): > Migrate enumerations 'push_default', 'autorebase', and > 'object_creation_mode'. Care was taken to make these types available > to the configuration structure without triggering circular header > dependencies. > > RFC: > > Commit 3~5. Is it really necessary to migrate _program variables? > https://lore.kernel.org/git/8e657184-ee0b-453a-9f2d-a98080d3582e@gmail.com/ > > Commit 6~9. Previous related discussions on 'git_branch_track'. > https://lore.kernel.org/git/CAD=f0L-mPX+KECUjXk-WBzEbTP7wCa8sB56GySQT0yh9mfUOWw@mail.gmail.com/ > > Note: > > Since a new getter 'repo_excludes_file()' is introduced, as previously > promised, once it is finally merged into 'master', there will be a patch to > update and squash the comments. > > Similarly, I've noticed that the classification and sorting of variables in > 'repo_config_values' don't seem to be correct. There will also be a patch > to fix this, and I think it will form a commit series along with the comment > patch? > > Change since v8: > > Fixed a memory leak in pager.c. > > Thanks! > > Tian Yuchen (9): > repository: introduce repo_config_values_clear() > environment: move excludes_file into repo_config_values > environment: move editor_program into repo_config_values > environment: move pager_program into repo_config_values > environment: move askpass_program into repo_config_values > environment: migrate apply_default_whitespace and > apply_default_ignorewhitespace > environment: move push_default into repo_config_values > environment: move autorebase into repo_config_values > environment: move object_creation_mode into repo_config_values > > apply.c | 20 +++++++----- > branch.c | 2 +- > builtin/push.c | 8 ++--- > dir.c | 4 +-- > editor.c | 4 +-- > environment.c | 87 +++++++++++++++++++++++++++++++++++--------------- > environment.h | 75 +++++++++++++++++++++++++++---------------- > object-file.c | 2 +- > pager.c | 26 +++++++++------ > prompt.c | 3 +- > remote.c | 2 +- > repository.c | 1 + > 12 files changed, 152 insertions(+), 82 deletions(-) Hi! I missed a base-commit to easily apply this locally, could we add one? Thanks! Pablo