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

[PATCH] sequencer: make sign_off_header a file local symbol

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Feb 11, 2019, 17:16 UTC
Message-ID
<93b23b5a-7fcd-e9ec-3411-f8362b601732@ramsayjones.plus.com>

Commit d0aaa46fd3 ("commit: move empty message checks to libgit", 2017-11-10) removes the last use of 'sign_off_header' outside of the "sequencer.c" source file. Remove the extern declaration from the header file and mark the definition of the symbol with the static keyword.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Junio,

This has been hanging around for a while. I sent it to the list last time in [1], but it seems to have been dropped. (Found while attempting to rebase loads of old branches to a newer base!)

ATB, Ramsay Jones

[1] https://public-inbox.org/git/8caabe3e-4dc3-657a-236d-6cf91e1e6d03@ramsayjones.plus.com/
 sequencer.c | 2 +-
 sequencer.h | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index e1a4dd15f1..20f1823b06 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -35,7 +35,7 @@
 
 #define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION"
 
-const char sign_off_header[] = "Signed-off-by: ";
+static const char sign_off_header[] = "Signed-off-by: ";
 static const char cherry_picked_prefix[] = "(cherry picked from commit ";
 
 GIT_PATH_FUNC(git_path_commit_editmsg, "COMMIT_EDITMSG")
diff --git a/sequencer.h b/sequencer.h
index 5071a73563..e5e4845f14 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -102,8 +102,6 @@ int complete_action(struct replay_opts *opts, unsigned flags,
 		    unsigned autosquash);
 int rearrange_squash(void);
 
-extern const char sign_off_header[];
-
 /*
  * Append a signoff to the commit message in "msgbuf". The ignore_footer
  * parameter specifies the number of bytes at the end of msgbuf that should
-- 
2.20.0
Next: Junio C Hamano
Message 1 of 2 in “sequencer: make sign_off_header a file local symbol”
  1. sequencer: make sign_off_header a file local symbolRamsay Jones, Feb 11, 2019
  2. Junio C HamanoFeb 11, 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.