]> git.ipfire.org Git - thirdparty/git.git/commitdiff
sequencer: remove todo_add_branch_context.commit
authorAbhinav Gupta <mail@abhinavg.net>
Mon, 11 May 2026 12:21:53 +0000 (12:21 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 May 2026 00:41:53 +0000 (09:41 +0900)
The 'commit' field in 'struct todo_add_branch_context' is unused.
It's written to, but never read from.
add_decorations_to_list() gets the commit passed to it explicitly
as an argument.

Signed-off-by: Abhinav Gupta <mail@abhinavg.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c

index b7d8dca47f4a58a7b67340dabea99a0f3ace86d0..19839da1e6b96e12924047bd528060f3bd14f3e1 100644 (file)
@@ -6409,7 +6409,6 @@ struct todo_add_branch_context {
        size_t items_nr;
        size_t items_alloc;
        struct strbuf *buf;
-       struct commit *commit;
        struct string_list refs_to_oids;
 };
 
@@ -6498,7 +6497,6 @@ static int todo_list_add_update_ref_commands(struct todo_list *todo_list)
                ctx.items[ctx.items_nr++] = todo_list->items[i++];
 
                if (item->commit) {
-                       ctx.commit = item->commit;
                        add_decorations_to_list(item->commit, &ctx);
                }
        }