git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] sequencer: make sign_off_header a file local symbol
@ 2017-11-20 20:27 Ramsay Jones
  2017-11-21  1:06 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Ramsay Jones @ 2017-11-20 20:27 UTC (permalink / raw)
  To: vmiklos; +Cc: Junio C Hamano, GIT Mailing-list


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

Hi Miklos,

If you need to re-roll your 'mv/cherry-pick-s' branch, could you
please squash this into the relevant patch (commit 5ed75e2a3f,
"cherry-pick: don't forget -s on failure", 14-09-2017).

[noticed by sparse].

Thanks!

ATB,
Ramsay Jones

 sequencer.c | 2 +-
 sequencer.h | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/sequencer.c b/sequencer.c
index 53b5100a7..b8c0ed170 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -26,7 +26,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_seq_dir, "sequencer")
diff --git a/sequencer.h b/sequencer.h
index 77cb174b2..688b0276d 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -53,8 +53,6 @@ int check_todo_list(void);
 int skip_unnecessary_picks(void);
 int rearrange_squash(void);
 
-extern const char sign_off_header[];
-
 void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag);
 void append_conflicts_hint(struct strbuf *msgbuf);
 int git_sequencer_config(const char *k, const char *v, void *cb);
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] sequencer: make sign_off_header a file local symbol
  2017-11-20 20:27 Ramsay Jones
@ 2017-11-21  1:06 ` Junio C Hamano
  2017-11-21  3:10   ` Junio C Hamano
  2017-11-21 10:52   ` Ramsay Jones
  0 siblings, 2 replies; 7+ messages in thread
From: Junio C Hamano @ 2017-11-21  1:06 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: vmiklos, GIT Mailing-list

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

> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi Miklos,
>
> If you need to re-roll your 'mv/cherry-pick-s' branch, could you
> please squash this into the relevant patch (commit 5ed75e2a3f,
> "cherry-pick: don't forget -s on failure", 14-09-2017).

What automated procedure are you using to produce these comments?

The commit is from 14-09-2012, not from a few months ago, and is
part of Git 1.8.0 and upwards, which won't be rerolled.  Please add
a check to see if the culprit is already in 'next' or something.

Will queue as _your_ fix, not a potential squash into another
commit.

Thanks, as always, for your attention to detail.





>  sequencer.c | 2 +-
>  sequencer.h | 2 --
>  2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/sequencer.c b/sequencer.c
> index 53b5100a7..b8c0ed170 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -26,7 +26,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_seq_dir, "sequencer")
> diff --git a/sequencer.h b/sequencer.h
> index 77cb174b2..688b0276d 100644
> --- a/sequencer.h
> +++ b/sequencer.h
> @@ -53,8 +53,6 @@ int check_todo_list(void);
>  int skip_unnecessary_picks(void);
>  int rearrange_squash(void);
>  
> -extern const char sign_off_header[];
> -
>  void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag);
>  void append_conflicts_hint(struct strbuf *msgbuf);
>  int git_sequencer_config(const char *k, const char *v, void *cb);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] sequencer: make sign_off_header a file local symbol
  2017-11-21  1:06 ` Junio C Hamano
@ 2017-11-21  3:10   ` Junio C Hamano
  2017-11-21 10:52   ` Ramsay Jones
  1 sibling, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2017-11-21  3:10 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: vmiklos, GIT Mailing-list

Junio C Hamano <gitster@pobox.com> writes:

> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
>
>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
>> ---
>>
>> Hi Miklos,
>>
>> If you need to re-roll your 'mv/cherry-pick-s' branch, could you
>> please squash this into the relevant patch (commit 5ed75e2a3f,
>> "cherry-pick: don't forget -s on failure", 14-09-2017).
>
> What automated procedure are you using to produce these comments?
>
> The commit is from 14-09-2012, not from a few months ago, and is
> part of Git 1.8.0 and upwards, which won't be rerolled.  Please add
> a check to see if the culprit is already in 'next' or something.
>
> Will queue as _your_ fix, not a potential squash into another
> commit.
>
> Thanks, as always, for your attention to detail.

Yuck.  Somebody in flight does use this symbol from elsewhere, so it
cannot be made static.  Let's drop this patch for now.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] sequencer: make sign_off_header a file local symbol
  2017-11-21  1:06 ` Junio C Hamano
  2017-11-21  3:10   ` Junio C Hamano
@ 2017-11-21 10:52   ` Ramsay Jones
  1 sibling, 0 replies; 7+ messages in thread
From: Ramsay Jones @ 2017-11-21 10:52 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: vmiklos, GIT Mailing-list, Phillip Wood



On 21/11/17 01:06, Junio C Hamano wrote:
> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
> 
>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
>> ---
>>
>> Hi Miklos,
>>
>> If you need to re-roll your 'mv/cherry-pick-s' branch, could you
>> please squash this into the relevant patch (commit 5ed75e2a3f,
>> "cherry-pick: don't forget -s on failure", 14-09-2017).
> 
> What automated procedure are you using to produce these comments?

Err, no automated procedure, hence the idiocy ... :(

> The commit is from 14-09-2012, not from a few months ago, and is
> part of Git 1.8.0 and upwards, which won't be rerolled.  Please add
> a check to see if the culprit is already in 'next' or something.

Yes, sorry, I wasn't paying attention. The actual commit which caused
the 'static-check.pl' script to bark, was d0aaa46fd3 ("commit: move empty
message checks to libgit", 10-11-2017) in the 'pu' branch. This commit
removes the last use of 'sign_off_header' outside of sequencer.c (from
builtin/commit.c).

> Will queue as _your_ fix, not a potential squash into another
> commit.

The above commit is in the 'pw/sequencer-in-process-commit' branch.
Sorry for the confusion. (Sorry Miklos).

> Thanks, as always, for your attention to detail.

Ahem. :D

ATB,
Ramsay Jones



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] sequencer: make sign_off_header a file local symbol
@ 2017-12-10  0:08 Ramsay Jones
  0 siblings, 0 replies; 7+ messages in thread
From: Ramsay Jones @ 2017-12-10  0:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GIT Mailing-list


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,

Now that the 'pw/sequencer-in-process-commit' branch has
graduated to 'next', the static-check.pl script is barking on
that branch. This patch applies to the next (and pu) branches
without conflict. You mentioned that the previous version of
this patch (see [1]) conflicted with an in-flight patch series.
('ot/pretty' and 'lb/rebase-i-short-command-names' have nearby
changes, but don't conflict).

Was this an 'not in any integration branch, but I'm still holding
onto it' topic branch? If it is still a problem, please just ignore
this patch.

Thanks!

[1] https://public-inbox.org/git/%3Cd9d05477-5d2f-04fc-adee-10d18bc0947d@ramsayjones.plus.com%3E/

ATB,
Ramsay Jones


 sequencer.c | 2 +-
 sequencer.h | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/sequencer.c b/sequencer.c
index 0f17b4d32..8c2af94ed 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -26,7 +26,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_seq_dir, "sequencer")
diff --git a/sequencer.h b/sequencer.h
index 77cb174b2..688b0276d 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -53,8 +53,6 @@ int check_todo_list(void);
 int skip_unnecessary_picks(void);
 int rearrange_squash(void);
 
-extern const char sign_off_header[];
-
 void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag);
 void append_conflicts_hint(struct strbuf *msgbuf);
 int git_sequencer_config(const char *k, const char *v, void *cb);
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] sequencer: make sign_off_header a file local symbol
@ 2019-02-11 17:16 Ramsay Jones
  2019-02-11 21:08 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Ramsay Jones @ 2019-02-11 17:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GIT Mailing-list


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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] sequencer: make sign_off_header a file local symbol
  2019-02-11 17:16 [PATCH] sequencer: make sign_off_header a file local symbol Ramsay Jones
@ 2019-02-11 21:08 ` Junio C Hamano
  0 siblings, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2019-02-11 21:08 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: GIT Mailing-list

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-02-11 21:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 17:16 [PATCH] sequencer: make sign_off_header a file local symbol Ramsay Jones
2019-02-11 21:08 ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2017-12-10  0:08 Ramsay Jones
2017-11-20 20:27 Ramsay Jones
2017-11-21  1:06 ` Junio C Hamano
2017-11-21  3:10   ` Junio C Hamano
2017-11-21 10:52   ` Ramsay Jones

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).