Skip to content

Commit 770afe4

Browse files
committed
config: mark otherwise unused function as file-scope static
git_configset_get_pathname() is only used once inside config.c; we do not have to expose it as a public function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent ccfcaf3 commit 770afe4

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1954,7 +1954,7 @@ int git_configset_get_maybe_bool(struct config_set *set, const char *key, int *d
19541954
return 1;
19551955
}
19561956

1957-
int git_configset_get_pathname(struct config_set *set, const char *key, char **dest)
1957+
static int git_configset_get_pathname(struct config_set *set, const char *key, char **dest)
19581958
{
19591959
const char *value;
19601960
if (!git_configset_get_value(set, key, &value, NULL))

config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,6 @@ int git_configset_get_ulong(struct config_set *cs, const char *key, unsigned lon
564564
int git_configset_get_bool(struct config_set *cs, const char *key, int *dest);
565565
int git_configset_get_bool_or_int(struct config_set *cs, const char *key, int *is_bool, int *dest);
566566
int git_configset_get_maybe_bool(struct config_set *cs, const char *key, int *dest);
567-
int git_configset_get_pathname(struct config_set *cs, const char *key, char **dest);
568567

569568
/**
570569
* Run only the discover part of the repo_config_get_*() functions

0 commit comments

Comments
 (0)