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>maint
parent
909a2bfb1f
commit
2ea8536468
2
config.c
2
config.c
|
|
@ -2564,7 +2564,7 @@ static void git_config_check_init(struct repository *repo)
|
||||||
repo_read_config(repo);
|
repo_read_config(repo);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void repo_config_clear(struct repository *repo)
|
void repo_config_clear(struct repository *repo)
|
||||||
{
|
{
|
||||||
if (!repo->config || !repo->config->hash_initialized)
|
if (!repo->config || !repo->config->hash_initialized)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
1
config.h
1
config.h
|
|
@ -651,6 +651,7 @@ int git_config_get_string_multi(const char *key,
|
||||||
* Resets and invalidates the config cache.
|
* Resets and invalidates the config cache.
|
||||||
*/
|
*/
|
||||||
void git_config_clear(void);
|
void git_config_clear(void);
|
||||||
|
void repo_config_clear(struct repository *repo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allocates and copies the retrieved string into the `dest` parameter for
|
* Allocates and copies the retrieved string into the `dest` parameter for
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue