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

[PATCH] sequencer: mark file local symbols as static

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Jan 13, 2019, 20:58 UTC
Message-ID
<5440ddf5-0b80-3d00-7daf-133a8611efa8@ramsayjones.plus.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Alban,

If you need to re-roll your 'ag/sequencer-reduce-rewriting-todo' branch, could you please squash this into the relevant patch [commit 45f215c912 ("rebase-interactive: use todo_list_write_to_file() in edit_todo_list()", 2018-12-29)].

I believe this commit removes the final calls to write_message() outside of sequencer.c, so that this is now a file-local symbol.

Thanks!
[another patch for this branch is just coming up ...]

ATB, Ramsay Jones

 sequencer.c | 4 ++--
 sequencer.h | 3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 60beeacdeb..64753af68e 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -383,8 +383,8 @@ static void print_advice(struct repository *r, int show_hint,
 	}
 }
 
-int write_message(const void *buf, size_t len, const char *filename,
-		  int append_eol)
+static int write_message(const void *buf, size_t len, const char *filename,
+			 int append_eol)
 {
 	struct lock_file msg_file = LOCK_INIT;
 
diff --git a/sequencer.h b/sequencer.h
index 33a6070c64..0ccbe390b2 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -67,9 +67,6 @@ struct replay_opts {
 };
 #define REPLAY_OPTS_INIT { .action = -1, .current_fixups = STRBUF_INIT }
 
-int write_message(const void *buf, size_t len, const char *filename,
-		  int append_eol);
-
 /*
  * Note that ordering matters in this enum. Not only must it match the mapping
  * of todo_command_info (in sequencer.c), it is also divided into several
-- 
2.20.0
Message 1 of 1 in “sequencer: mark file local symbols as static”
  1. sequencer: mark file local symbols as staticRamsay Jones, Jan 13, 2019

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.