]> git.ipfire.org Git - thirdparty/git.git/commit
environment: move askpass_program into repo_config_values
authorTian Yuchen <cat@malon.dev>
Tue, 14 Jul 2026 03:25:20 +0000 (11:25 +0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Jul 2026 14:30:23 +0000 (07:30 -0700)
commit48cbe400794bd055d259143a01024da71da5fe1a
tree9f71ce2d46b1ea3b6558a7bd0dd1bdc760e3b04d
parente57125d804f29b8a6c70a47a03037cf31ef153d7
environment: move askpass_program into repo_config_values

The global variable 'askpass_program' stores the path to the program
used to prompt the user for credentials. Move it into repo_config_values
to continue the libification effort.

While it is uncommon for a single process to require different askpass
programs for different repositories, maintaining this value as a mutable
global string is a blocker for libification. Global heap-allocated
strings introduce thread-safety issues in a multi-repo environment.

Move 'askpass_program' into 'struct repo_config_values' to eliminate
this global state. The memory is now safely managed and freed via
'repo_config_values_clear()'.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Mentored-by: Olamide Caleb Bello <belkid98@gmail.com>
Signed-off-by: Tian Yuchen <cat@malon.dev>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
environment.c
environment.h
prompt.c