From: Junio C Hamano Date: Fri, 26 Jun 2026 15:43:25 GMT Subject: Re: [PATCH v2 2/2] environment: move excludes_file into repo_config_values Message-ID: In-Reply-To: <20260626075037.532164-3-cat@malon.dev> Tian Yuchen writes: > Continue the libification effort by moving the 'excludes_file' global > variable into 'struct repo_config_values'. > > Since 'excludes_file' is a dynamically allocated string (char *), it > requires proper memory management. Introduce repo_config_values_clear() > to safely free the heap memory when repository instance is destroyed. > > Note: > > - 'if (repo != the_repository)' fallback logic is temporarily added > in both the getter and the clear function. This prevents calling > repo_config_values() on uninitialized submodules, which triggers BUG(). > > - 'attribute_file' is another string variable that was migrated > earlier. Its FREE_AND_NULL() call is also added to > repo_config_values_clear(). OK. I think the placement of the new member in repo_config_values in this round, moving to the spot next to existing attributes_file, makes more sense than the previous round, too. Looking good. Shall we mark it as ready for 'next' now?