]> git.ipfire.org Git - thirdparty/git.git/commitdiff
config: mark otherwise unused function as file-scope static
authorJunio C Hamano <gitster@pobox.com>
Thu, 20 Nov 2025 19:32:45 +0000 (11:32 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Nov 2025 23:03:40 +0000 (15:03 -0800)
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>
config.c
config.h

index 73fc74c8fa1a35133d4d333356845cd1e73f6acd..6552e5b0b8020232fbc5dcd128794e9cfe2ab698 100644 (file)
--- 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))
index 19c87fc0bc1a2a8a6a1a7ad6c61c6fab50b6ce44..ba426a960af9f4c10ea7102cea34384920270cb8 100644 (file)
--- 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