Skip to content

Commit 3ce1138

Browse files
derrickstoleegitster
authored andcommitted
config: make git_configset_get_string_tmp() private
This method was created in f1de981 (config: fix leaks from git_config_get_string_const(), 2020-08-14) but its only use was in the repo_config_get_string_tmp() method, also declared in config.h and implemented in config.c. Since this is otherwise unused and is a very similar implementation to git_configset_get_value(), let's remove this declaration. Signed-off-by: Derrick Stolee <[email protected]> Reviewed-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5325591 commit 3ce1138

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

config.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,8 +2179,8 @@ int git_configset_get_string(struct config_set *cs, const char *key, char **dest
21792179
return 1;
21802180
}
21812181

2182-
int git_configset_get_string_tmp(struct config_set *cs, const char *key,
2183-
const char **dest)
2182+
static int git_configset_get_string_tmp(struct config_set *cs, const char *key,
2183+
const char **dest)
21842184
{
21852185
const char *value;
21862186
if (!git_configset_get_value(cs, key, &value)) {

config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ void git_configset_clear(struct config_set *cs);
494494
int git_configset_get_value(struct config_set *cs, const char *key, const char **dest);
495495

496496
int git_configset_get_string(struct config_set *cs, const char *key, char **dest);
497-
int git_configset_get_string_tmp(struct config_set *cs, const char *key, const char **dest);
498497
int git_configset_get_int(struct config_set *cs, const char *key, int *dest);
499498
int git_configset_get_ulong(struct config_set *cs, const char *key, unsigned long *dest);
500499
int git_configset_get_bool(struct config_set *cs, const char *key, int *dest);

0 commit comments

Comments
 (0)