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

[PATCH 1/7] builtin/notes.c: mark file-scope functions as static

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 15, 2012, 21:10 UTC
Message-ID
<1347743452-2487-1-git-send-email-gitster@pobox.com>
In-Reply-To
<5054AA62.2040603@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin.h       | 2 --
 builtin/notes.c | 7 +++++--
 2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/builtin.h b/builtin.h
index 8e37752..95116b8 100644
--- a/builtin.h
+++ b/builtin.h
@@ -21,7 +21,6 @@ struct fmt_merge_msg_opts {
 
 extern int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
 			 struct fmt_merge_msg_opts *);
-extern void commit_notes(struct notes_tree *t, const char *msg);
 
 struct notes_rewrite_cfg {
 	struct notes_tree **trees;
@@ -33,7 +32,6 @@ struct notes_rewrite_cfg {
 	int mode_from_env;
 };
 
-combine_notes_fn parse_combine_notes_fn(const char *v);
 struct notes_rewrite_cfg *init_copy_notes_for_rewrite(const char *cmd);
 int copy_note_for_rewrite(struct notes_rewrite_cfg *c,
 			  const unsigned char *from_obj, const unsigned char *to_obj);
diff --git a/builtin/notes.c b/builtin/notes.c
index 554c801..453457a 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -19,6 +19,9 @@
 #include "string-list.h"
 #include "notes-merge.h"
 
+static void commit_notes(struct notes_tree *t, const char *msg);
+static combine_notes_fn parse_combine_notes_fn(const char *v);
+
 static const char * const git_notes_usage[] = {
 	N_("git notes [--ref <notes_ref>] [list [<object>]]"),
 	N_("git notes [--ref <notes_ref>] add [-f] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
@@ -288,7 +291,7 @@ static int parse_reedit_arg(const struct option *opt, const char *arg, int unset
 	return parse_reuse_arg(opt, arg, unset);
 }
 
-void commit_notes(struct notes_tree *t, const char *msg)
+static void commit_notes(struct notes_tree *t, const char *msg)
 {
 	struct strbuf buf = STRBUF_INIT;
 	unsigned char commit_sha1[20];
@@ -312,7 +315,7 @@ void commit_notes(struct notes_tree *t, const char *msg)
 	strbuf_release(&buf);
 }
 
-combine_notes_fn parse_combine_notes_fn(const char *v)
+static combine_notes_fn parse_combine_notes_fn(const char *v)
 {
 	if (!strcasecmp(v, "overwrite"))
 		return combine_notes_overwrite;
-- 
1.7.12.508.g4d78187
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 15 in “test-string-list.c: Fix some sparse warnings”
  1. test-string-list.c: Fix some sparse warningsRamsay Jones, Sep 15, 2012
  2. Junio C HamanoSep 15, 2012
  3. 1/7 builtin/notes.c: mark file-scope functions as staticJunio C Hamano, Sep 15, 2012
  4. 2/7 commit.c: mark file-scope functions as staticJunio C Hamano, Sep 15, 2012
  5. 3/7 diff.c: mark private file-scope symbols as staticJunio C Hamano, Sep 15, 2012
  6. 4/7 graph.c: mark private file-scope symbols as staticJunio C Hamano, Sep 15, 2012
  7. 5/7 grep.c: mark private file-scope symbols as staticJunio C Hamano, Sep 15, 2012
  8. Ramsay JonesSep 19, 2012
  9. Junio C HamanoSep 19, 2012
  10. Ramsay JonesSep 20, 2012
  11. 6/7 rerere.c: mark private file-scope symbols as staticJunio C Hamano, Sep 15, 2012
  12. 7/7 notes.c: mark private file-scope symbols as staticJunio C Hamano, Sep 15, 2012
  13. Michael HaggertySep 17, 2012
  14. Ramsay JonesSep 19, 2012
  15. Michael HaggertySep 20, 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.