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

[PATCH 1/2] send-pack.c: mark a file-local function static

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Jan 5, 2014, 23:55 UTC
Message-ID
<52C9F0D5.9080800@ramsay1.demon.co.uk>

Commit f2c681cf ("send-pack: support pushing from a shallow clone via http", 05-12-2013) adds the 'advertise_shallow_grafts_buf' function as an external symbol.

Noticed by sparse. ("'advertise_shallow_grafts_buf' was not declared. Should it be static?")

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 send-pack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/send-pack.c b/send-pack.c
index 2a199cc..6129b0f 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -183,7 +183,7 @@ static int advertise_shallow_grafts_cb(const struct commit_graft *graft, void *c
 	return 0;
 }
 
-void advertise_shallow_grafts_buf(struct strbuf *sb)
+static void advertise_shallow_grafts_buf(struct strbuf *sb)
 {
 	if (!is_repository_shallow())
 		return;
-- 
1.8.5
Message 1 of 1 in “send-pack.c: mark a file-local function static”
  1. 1/2 send-pack.c: mark a file-local function staticRamsay Jones, Jan 5, 2014

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.