config: expose `repo_config_clear()`
While we already have `repo_config_clear()` as an alternative to `git_config_clear()` that doesn't rely on `the_repository`, it is not exposed to callers outside of the config subsystem. Do so. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
Aug 13, 2024 at 11:13 UTC
2ea853646807f36ccd8d5c8e30b146c33f4ca3eb
2 files changed
+2
-1
config.c
+1
-1
@@ -2564,7 +2564,7 @@ static void git_config_check_init(struct repository *repo)
2564
repo_read_config(repo);
2565
}
2566
2567
-static void repo_config_clear(struct repository *repo)
2567
+void repo_config_clear(struct repository *repo)
2568
{
2569
if (!repo->config || !repo->config->hash_initialized)
2570
return;
config.h
+1
@@ -651,6 +651,7 @@ int git_config_get_string_multi(const char *key,
651
* Resets and invalidates the config cache.
652
*/
653
void git_config_clear(void);
654
+void repo_config_clear(struct repository *repo);
655
656
/**
657
* Allocates and copies the retrieved string into the `dest` parameter for