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

[PATCH v3 11/11] sequencer: restrict scope of a formerly public function

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Sep 7, 2021, 21:05 UTC
Message-ID
<aae9323b25fa9cdd69dcde278f9ac2c60539f153.1631048713.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.195.v3.git.1631048712.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

The function to add the `exec` commands to the todo list only needed to be public API because it was not only used internally by the sequencer, but also by `git rebase --preserve-merges`.

Now that that mode has been removed, we no longer need that function to be scoped publicly.

Helped-by: Alban Gruin <alban.gruin@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 sequencer.c | 4 ++--
 sequencer.h | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 7f07cd00f3f..3cdb20b0743 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -5387,8 +5387,8 @@ int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,
  * Add commands after pick and (series of) squash/fixup commands
  * in the todo list.
  */
-void todo_list_add_exec_commands(struct todo_list *todo_list,
-				 struct string_list *commands)
+static void todo_list_add_exec_commands(struct todo_list *todo_list,
+					struct string_list *commands)
 {
 	struct strbuf *buf = &todo_list->buf;
 	size_t base_offset = buf->len;
diff --git a/sequencer.h b/sequencer.h
index d57d8ea23d7..60a156ea906 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -160,8 +160,6 @@ int sequencer_remove_state(struct replay_opts *opts);
 int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,
 			  const char **argv, unsigned flags);
 
-void todo_list_add_exec_commands(struct todo_list *todo_list,
-				 struct string_list *commands);
 int complete_action(struct repository *r, struct replay_opts *opts, unsigned flags,
 		    const char *shortrevisions, const char *onto_name,
 		    struct commit *onto, const struct object_id *orig_head,
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Ævar Arnfjörð Bjarmason
Message 77 of 78 in “Drop support for git rebase --preserve-merges”
  1. 0/8 Drop support for git rebase --preserve-mergesJohannes Schindelin via GitGitGadget, Nov 23, 2019
  2. 1/8 t5520: do not use `pull.rebase=preserve`Johannes Schindelin via GitGitGadget, Nov 23, 2019
  3. 2/8 remote: warn about unhandled branch.<name>.rebase valuesJohannes Schindelin via GitGitGadget, Nov 23, 2019
  4. 4/8 pull: remove support for `--rebase=preserve`Johannes Schindelin via GitGitGadget, Nov 23, 2019
  5. 6/8 git-svn: drop support for `--preserve-merges`Johannes Schindelin via GitGitGadget, Nov 23, 2019
  6. Eric WongNov 23, 2019
  7. Johannes SchindelinNov 24, 2019
  8. Eric WongNov 25, 2019
  9. 3/8 tests: stop testing `git rebase --preserve-merges`Johannes Schindelin via GitGitGadget, Nov 23, 2019
  10. 8/8 remote: no longer claim that branch.*.rebase=preserve is a thingJohannes Schindelin via GitGitGadget, Nov 23, 2019
  11. 7/8 rebase: drop the internal `rebase--interactive` commandJohannes Schindelin via GitGitGadget, Nov 23, 2019
  12. 5/8 rebase: drop support for `--preserve-merges`Johannes Schindelin via GitGitGadget, Nov 23, 2019
  13. 0/7 Drop support for git rebase --preserve-mergesJohannes Schindelin via GitGitGadget, Sep 1, 2021
  14. 1/7 t5520: do not use `pull.rebase=preserve`Johannes Schindelin via GitGitGadget, Sep 1, 2021
  15. 2/7 remote: warn about unhandled branch.<name>.rebase valuesJohannes Schindelin via GitGitGadget, Sep 1, 2021
  16. 4/7 pull: remove support for `--rebase=preserve`Johannes Schindelin via GitGitGadget, Sep 1, 2021
  17. 3/7 tests: stop testing `git rebase --preserve-merges`Johannes Schindelin via GitGitGadget, Sep 1, 2021
  18. Ævar Arnfjörð BjarmasonSep 1, 2021
  19. 6/7 git-svn: drop support for `--preserve-merges`Johannes Schindelin via GitGitGadget, Sep 1, 2021
  20. Ævar Arnfjörð BjarmasonSep 1, 2021
  21. Johannes SchindelinSep 2, 2021
  22. Johannes SchindelinSep 2, 2021
  23. 5/7 rebase: drop support for `--preserve-merges`Johannes Schindelin via GitGitGadget, Sep 1, 2021
  24. Ævar Arnfjörð BjarmasonSep 1, 2021
  25. Johannes SchindelinSep 2, 2021
  26. Ævar Arnfjörð BjarmasonSep 2, 2021
  27. Ævar Arnfjörð BjarmasonSep 1, 2021
  28. Johannes SchindelinSep 2, 2021
  29. Ævar Arnfjörð BjarmasonSep 2, 2021
  30. Ævar Arnfjörð BjarmasonSep 2, 2021
  31. Ævar Arnfjörð BjarmasonSep 2, 2021
  32. Ævar Arnfjörð BjarmasonSep 2, 2021
  33. Ævar Arnfjörð BjarmasonSep 2, 2021
  34. Johannes SchindelinSep 4, 2021
  35. Ævar Arnfjörð BjarmasonSep 5, 2021
  36. Junio C HamanoSep 5, 2021
  37. Phillip WoodSep 6, 2021
  38. Johannes SchindelinSep 7, 2021
  39. Phillip WoodSep 7, 2021
  40. Johannes SchindelinSep 7, 2021
  41. 7/7 rebase: drop the internal `rebase--interactive` commandJohannes Schindelin via GitGitGadget, Sep 1, 2021
  42. Phillip WoodSep 6, 2021
  43. Johannes SchindelinSep 7, 2021
  44. Ævar Arnfjörð BjarmasonSep 1, 2021
  45. Johannes SchindelinSep 2, 2021
  46. Ævar Arnfjörð BjarmasonSep 2, 2021
  47. Junio C HamanoSep 1, 2021
  48. Johannes SchindelinSep 2, 2021
  49. Johannes SixtSep 2, 2021
  50. Johannes SchindelinSep 7, 2021
  51. Elijah NewrenSep 7, 2021
  52. Johannes SchindelinSep 10, 2021
  53. Elijah NewrenSep 10, 2021
  54. merge-ort and --rebase-merges, was Re: [PATCH v2 0/7] Drop support for git rebase --preserve-mergesJohannes Schindelin, Sep 13, 2021
  55. Elijah NewrenSep 13, 2021
  56. Ævar Arnfjörð BjarmasonSep 6, 2021
  57. Junio C HamanoSep 7, 2021
  58. Ævar Arnfjörð BjarmasonSep 7, 2021
  59. Alban GruinSep 4, 2021
  60. Phillip WoodSep 6, 2021
  61. Johannes SchindelinSep 7, 2021
  62. 00/11 Drop support for git rebase --preserve-mergesJohannes Schindelin via GitGitGadget, Sep 7, 2021
  63. 01/11 t5520: do not use `pull.rebase=preserve`Johannes Schindelin via GitGitGadget, Sep 7, 2021
  64. 02/11 remote: warn about unhandled branch.<name>.rebase valuesJohannes Schindelin via GitGitGadget, Sep 7, 2021
  65. 03/11 tests: stop testing `git rebase --preserve-merges`Johannes Schindelin via GitGitGadget, Sep 7, 2021
  66. 04/11 pull: remove support for `--rebase=preserve`Johannes Schindelin via GitGitGadget, Sep 7, 2021
  67. 06/11 git-svn: drop support for `--preserve-merges`Johannes Schindelin via GitGitGadget, Sep 7, 2021
  68. 05/11 rebase: drop support for `--preserve-merges`Johannes Schindelin via GitGitGadget, Sep 7, 2021
  69. Ævar Arnfjörð BjarmasonSep 10, 2021
  70. re-mentioning --preserve-merges in the docs (was: [PATCH v3 05/11] rebase: drop support for `--preserve-merges`)Ævar Arnfjörð Bjarmason, Jul 21, 2022
  71. Junio C HamanoJul 21, 2022
  72. Johannes SchindelinJul 29, 2022
  73. 07/11 rebase: drop the internal `rebase--interactive` commandJohannes Schindelin via GitGitGadget, Sep 7, 2021
  74. 08/11 rebase: remove obsolete code commentJohannes Schindelin via GitGitGadget, Sep 7, 2021
  75. 09/11 rebase: stop mentioning the -p option in commentsJohannes Schindelin via GitGitGadget, Sep 7, 2021
  76. 10/11 rebase: remove a no-longer-used functionJohannes Schindelin via GitGitGadget, Sep 7, 2021
  77. 11/11 sequencer: restrict scope of a formerly public functionJohannes Schindelin via GitGitGadget, Sep 7, 2021
  78. Ævar Arnfjörð BjarmasonSep 8, 2021

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.