Skip to content

Commit 2ea8536

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 909a2bf commit 2ea8536

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2564,7 +2564,7 @@ static void git_config_check_init(struct repository *repo)
25642564
repo_read_config(repo);
25652565
}
25662566

2567-
static void repo_config_clear(struct repository *repo)
2567+
void repo_config_clear(struct repository *repo)
25682568
{
25692569
if (!repo->config || !repo->config->hash_initialized)
25702570
return;

config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ int git_config_get_string_multi(const char *key,
651651
* Resets and invalidates the config cache.
652652
*/
653653
void git_config_clear(void);
654+
void repo_config_clear(struct repository *repo);
654655

655656
/**
656657
* Allocates and copies the retrieved string into the `dest` parameter for

0 commit comments

Comments
 (0)