From 06aa5e4ea4f2c5bbf5ae80f31b0dbd5df267ba74 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 7 Sep 2021 21:05:11 +0000 Subject: [PATCH] rebase: remove a no-longer-used function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the `--preserve-merges` option going away, we no longer need this function. Helped-by: Alban Gruin Signed-off-by: Johannes Schindelin Reviewed-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- rebase-interactive.c | 29 ----------------------------- rebase-interactive.h | 2 -- 2 files changed, 31 deletions(-) diff --git a/rebase-interactive.c b/rebase-interactive.c index b6cbd16a17..87649d0c01 100644 --- a/rebase-interactive.c +++ b/rebase-interactive.c @@ -226,32 +226,3 @@ int todo_list_check_against_backup(struct repository *r, struct todo_list *todo_ todo_list_release(&backup); return res; } - -int check_todo_list_from_file(struct repository *r) -{ - struct todo_list old_todo = TODO_LIST_INIT, new_todo = TODO_LIST_INIT; - int res = 0; - - if (strbuf_read_file(&new_todo.buf, rebase_path_todo(), 0) < 0) { - res = error(_("could not read '%s'."), rebase_path_todo()); - goto out; - } - - if (strbuf_read_file(&old_todo.buf, rebase_path_todo_backup(), 0) < 0) { - res = error(_("could not read '%s'."), rebase_path_todo_backup()); - goto out; - } - - res = todo_list_parse_insn_buffer(r, old_todo.buf.buf, &old_todo); - if (!res) - res = todo_list_parse_insn_buffer(r, new_todo.buf.buf, &new_todo); - if (res) - fprintf(stderr, _(edit_todo_list_advice)); - if (!res) - res = todo_list_check(&old_todo, &new_todo); -out: - todo_list_release(&old_todo); - todo_list_release(&new_todo); - - return res; -} diff --git a/rebase-interactive.h b/rebase-interactive.h index dc2cf0ee12..7239c60f79 100644 --- a/rebase-interactive.h +++ b/rebase-interactive.h @@ -16,6 +16,4 @@ int todo_list_check(struct todo_list *old_todo, struct todo_list *new_todo); int todo_list_check_against_backup(struct repository *r, struct todo_list *todo_list); -int check_todo_list_from_file(struct repository *r); - #endif