aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-11-20 11:32:45 -0800
committerJunio C Hamano <gitster@pobox.com>2025-11-20 15:03:40 -0800
commit770afe443784b3ec2c72d68aa509e48064942348 (patch)
treecba3de6481b8591b47d8ecd1a49488d8ca7d4a4d
parentccfcaf399ffcc91553395a8de8e833e7685e7cc2 (diff)
downloadgit-770afe443784b3ec2c72d68aa509e48064942348.tar.gz
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>
-rw-r--r--config.c2
-rw-r--r--config.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/config.c b/config.c
index 73fc74c8fa..6552e5b0b8 100644
--- a/config.c
+++ b/config.c
@@ -1954,7 +1954,7 @@ int git_configset_get_maybe_bool(struct config_set *set, const char *key, int *d
return 1;
}
-int git_configset_get_pathname(struct config_set *set, const char *key, char **dest)
+static int git_configset_get_pathname(struct config_set *set, const char *key, char **dest)
{
const char *value;
if (!git_configset_get_value(set, key, &value, NULL))
diff --git a/config.h b/config.h
index 19c87fc0bc..ba426a960a 100644
--- a/config.h
+++ b/config.h
@@ -564,7 +564,6 @@ int git_configset_get_ulong(struct config_set *cs, const char *key, unsigned lon
int git_configset_get_bool(struct config_set *cs, const char *key, int *dest);
int git_configset_get_bool_or_int(struct config_set *cs, const char *key, int *is_bool, int *dest);
int git_configset_get_maybe_bool(struct config_set *cs, const char *key, int *dest);
-int git_configset_get_pathname(struct config_set *cs, const char *key, char **dest);
/**
* Run only the discover part of the repo_config_get_*() functions