[PATCH] sequencer: make sign_off_header a file local symbol
Junio C Hamano
GIT Mailing-list
Ramsay Jones
2019-02-11 17:16:58 UTC

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!)

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 @@
-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