git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] config: mark otherise unused function as file-scope static

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 20, 2025, 19:32 UTC
Message-ID
<xmqqtsyo7b4y.fsf@gitster.g>

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>
---
 * Not related to anything in particular, but something I noticed
   while I was in the vicinity.
 config.c | 2 +-
 config.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/config.c b/config.c
index d55882c649..1738c0cb0d 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
-- 
2.52.0-101-g4c43c53c49
Next: Ramsay Jones
Message 1 of 4 in “config: mark otherise unused function as file-scope static”
  1. config: mark otherise unused function as file-scope staticJunio C Hamano, Nov 20, 2025
  2. Ramsay JonesNov 20, 2025
  3. brian m. carlsonNov 20, 2025
  4. Kristoffer HaugsbakkNov 20, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.