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

[PATCH 1/5] path.c: Remove the 'git_' prefix from a file scope function

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Sep 4, 2012, 17:26 UTC
Message-ID
<504639C6.8000009@ramsay1.demon.co.uk>

In particular, the git_vsnpath() function, despite the 'git_' prefix suggesting otherwise, is (correctly) declared with file scope.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 path.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/path.c b/path.c
index 66acd24..9eb5333 100644
--- a/path.c
+++ b/path.c
@@ -48,7 +48,7 @@ char *mksnpath(char *buf, size_t n, const char *fmt, ...)
 	return cleanup_path(buf);
 }
 
-static char *git_vsnpath(char *buf, size_t n, const char *fmt, va_list args)
+static char *vsnpath(char *buf, size_t n, const char *fmt, va_list args)
 {
 	const char *git_dir = get_git_dir();
 	size_t len;
@@ -72,7 +72,7 @@ char *git_snpath(char *buf, size_t n, const char *fmt, ...)
 {
 	va_list args;
 	va_start(args, fmt);
-	(void)git_vsnpath(buf, n, fmt, args);
+	(void)vsnpath(buf, n, fmt, args);
 	va_end(args);
 	return buf;
 }
@@ -82,7 +82,7 @@ char *git_pathdup(const char *fmt, ...)
 	char path[PATH_MAX];
 	va_list args;
 	va_start(args, fmt);
-	(void)git_vsnpath(path, sizeof(path), fmt, args);
+	(void)vsnpath(path, sizeof(path), fmt, args);
 	va_end(args);
 	return xstrdup(path);
 }
-- 
1.7.12
Message 1 of 1 in “path.c: Remove the 'git_' prefix from a file scope function”
  1. 1/5 path.c: Remove the 'git_' prefix from a file scope functionRamsay Jones, Sep 4, 2012

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.