# [PATCH] sequencer: make sign_off_header a file local symbol

2 messages from 2019-02-11 to 2019-02-11. Participants: Ramsay Jones, Junio C Hamano.
Thread: https://gitlist.dev/t/50463

## Ramsay Jones, 2019-02-11 17:16

Subject: [PATCH] sequencer: make sign_off_header a file local symbol
Message-ID: <93b23b5a-7fcd-e9ec-3411-f8362b601732@ramsayjones.plus.com>
URL: https://gitlist.dev/e/93b23b5a-7fcd-e9ec-3411-f8362b601732%40ramsayjones.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

```

## Junio C Hamano, 2019-02-11 21:08

Subject: Re: [PATCH] sequencer: make sign_off_header a file local symbol
Message-ID: <xmqqbm3ighic.fsf@gitster-ct.c.googlers.com>
URL: https://gitlist.dev/e/xmqqbm3ighic.fsf%40gitster-ct.c.googlers.com
In-Reply-To: <93b23b5a-7fcd-e9ec-3411-f8362b601732@ramsayjones.plus.com>

```
Ramsay Jones <ramsay@ramsayjones.plus.com> writes:

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

Thanks.  Will apply.

```
