]> git.ipfire.org Git - thirdparty/git.git/commitdiff
rebase: remove a no-longer-used function
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 7 Sep 2021 21:05:11 +0000 (21:05 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Sep 2021 04:45:33 +0000 (21:45 -0700)
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>
rebase-interactive.c
rebase-interactive.h

index b6cbd16a17fddd17690fb17575fa18f4fc8549b3..87649d0c016a371f83710a04140909d54a553aa7 100644 (file)
@@ -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;
-}
index dc2cf0ee122c70a9c9b4e614be058ee5c423dd80..7239c60f7919e75b227022971a136a42174d47ac 100644 (file)
@@ -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