diff options
| author | Tian Yuchen <cat@malon.dev> | 2026-07-14 11:25:18 +0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-07-14 07:30:23 -0700 |
| commit | 469e95c2573e938c0963ba52e8d06dd6aa7ba262 (patch) | |
| tree | e0e70f919de67091de2335425de4f72b13174d6f /contrib/persistent-https | |
| parent | 7488b9d1fd505ce1194b98893508fa5b194cf0cd (diff) | |
environment: move editor_program into repo_config_values
The global variable 'editor_program' holds the path to the user's
preferred editor. Move 'editor_program' into
'struct repo_config_values' to continue the libification effort.
There have been discussions on whether external programs like
editors truly need to be configured on a per-repository basis within
the same process. While a single process might rarely invoke
different editors, this migration is necessary for two reasons:
1. Developers frequently use different toolchains for different
projects. Per-repo configuration respects this.
2. Moving this string into 'repo_config_values' eliminates mutable
global state. As the codebase moves toward becoming a long-running
processes, managing multiple repositories concurrently must
not overwrite each other's program configurations.
No standalone getter function is introduced. Callers directly access
the field via 'repo_config_values()'. Heap memory is safely reclaimed
in '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>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
