From: Tian Yuchen Date: Tue, 30 Jun 2026 16:44:00 GMT Subject: [PATCH v5 0/1] environment: move excludes_file into repo_config_values Message-ID: <20260630164401.2906091-1-cat@malon.dev> In-Reply-To: <20260627160813.1074201-1-cat@malon.dev> This patch continues the libification effort by migrating the global string variable 'excludes_file' into 'struct repo_config_values'. Since this is a dynamically allocated variable, the migration requires proper heap memory management. This patch mainly does three things: - Abstract the XDG fallback lazy-loading logic out of dir.c into a proper getter. - Move the variables into the struct repo_config_values. - Introduce the memory destructor 'repo_config_values_clear()'. Changes since V4: Defensive checks are retained in both the getter (returning NULL if uninitialized) and the destructor (bypassing non-the_repository instances) to maintain bug-to-bug compatibility. These are marked with 'NEEDSWORK' comments. Future work will track down and fix the offending callers to eventually replace these shields with stricter BUG() assertions. [1] THANKS! Mentored-by: Christian Couder Mentored-by: Ayush Chandekar Mentored-by: Olamide Caleb Bello Signed-off-by: Tian Yuchen [1] https://lore.kernel.org/git/054b3fb6-0e69-473d-9778-b1b11ea82b3a@malon.dev/T/#mca0730b6735298316ec00a53d4719935d18837a6 Tian Yuchen (1): environment: move excludes_file into repo_config_values dir.c | 4 ++-- environment.c | 43 ++++++++++++++++++++++++++++++++++++++++--- environment.h | 13 ++++++++++++- repository.c | 1 + 4 files changed, 55 insertions(+), 6 deletions(-) -- 2.43.0