rebase: remove a no-longer-used function

With the `--preserve-merges` option going away, we no longer need this function. Helped-by: Alban Gruin <alban.gruin@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Sep 7, 2021 at 21:05 UTC 06aa5e4ea4f2c5bbf5ae80f31b0dbd5df267ba74
2 files changed -31
rebase-interactive.c
-29
@@ -226,32 +226,3 @@ int todo_list_check_against_backup(struct repository *r, struct todo_list *todo_
226 todo_list_release(&backup);
227 return res;
228 }
229 -
230 -int check_todo_list_from_file(struct repository *r)
231 -{
232 - struct todo_list old_todo = TODO_LIST_INIT, new_todo = TODO_LIST_INIT;
233 - int res = 0;
234 -
235 - if (strbuf_read_file(&new_todo.buf, rebase_path_todo(), 0) < 0) {
236 - res = error(_("could not read '%s'."), rebase_path_todo());
237 - goto out;
238 - }
239 -
240 - if (strbuf_read_file(&old_todo.buf, rebase_path_todo_backup(), 0) < 0) {
241 - res = error(_("could not read '%s'."), rebase_path_todo_backup());
242 - goto out;
243 - }
244 -
245 - res = todo_list_parse_insn_buffer(r, old_todo.buf.buf, &old_todo);
246 - if (!res)
247 - res = todo_list_parse_insn_buffer(r, new_todo.buf.buf, &new_todo);
248 - if (res)
249 - fprintf(stderr, _(edit_todo_list_advice));
250 - if (!res)
251 - res = todo_list_check(&old_todo, &new_todo);
252 -out:
253 - todo_list_release(&old_todo);
254 - todo_list_release(&new_todo);
255 -
256 - return res;
257 -}
rebase-interactive.h
-2
@@ -16,6 +16,4 @@ int todo_list_check(struct todo_list *old_todo, struct todo_list *new_todo);
16 int todo_list_check_against_backup(struct repository *r,
17 struct todo_list *todo_list);
18
19 -int check_todo_list_from_file(struct repository *r);
20 -
19 #endif