]> git.99rst.org Git - git.git/commit
environment: move pager_program into repo_config_values
authorTian Yuchen <redacted>
Tue, 14 Jul 2026 03:25:19 +0000 (11:25 +0800)
committerJunio C Hamano <redacted>
Tue, 14 Jul 2026 14:30:23 +0000 (07:30 -0700)
commite57125d804f29b8a6c70a47a03037cf31ef153d7
treea972a0767d19a2a0af9e8efe4765286dc6a47641
parent469e95c2573e938c0963ba52e8d06dd6aa7ba262
environment: move pager_program into repo_config_values

The 'pager_program' variable is currently defined as a file-scoped
static string in pager.c. Move it into 'struct repo_config_values'.

The configuration parsing logic remains strictly within pager.c to
respect subsystem boundaries. The read/write operations are simply
redirected to the repository-specific structure using
'repo_config_values()'. All current callers indeed pass
'the_repository', so this new enforcement does not harm them.

Similar to the recent editor_program migration, no standalone getter
is introduced to keep the code minimal. The dynamically allocated
memory is now managed by 'repo_config_values_clear()'.

On top of that, fix memory leaks in pager.c while we are at it.

Mentored-by: Christian Couder <redacted>
Mentored-by: Ayush Chandekar <redacted>
Mentored-by: Olamide Caleb Bello <redacted>
Signed-off-by: Tian Yuchen <redacted>
Signed-off-by: Junio C Hamano <redacted>
environment.c
environment.h
pager.c
git clone https://git.99rst.org/PROJECT