From: Phillip Wood Date: Wed, 15 Jul 2026 15:22:00 +0000 (+0100) Subject: sequencer: remove unnecessary condition in pick_one_commit() X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=871f9009d3fca0ac70d4df7f75c82b1e31213add;p=thirdparty%2Fgit.git sequencer: remove unnecessary condition in pick_one_commit() item->commit holds the commit to be picked and so it must be non-NULL otherwise pick_one_commit() would not know which commit to pick. It is also unconditionally dereferenced in do_pick_commit() which is called at the top of this function. Therefore the check to see if it is non-NULL is superfluous. Signed-off-by: Phillip Wood Signed-off-by: Junio C Hamano --- diff --git a/sequencer.c b/sequencer.c index a00e3622c8..8f3eed205e 100644 --- a/sequencer.c +++ b/sequencer.c @@ -4988,7 +4988,7 @@ static int pick_one_commit(struct repository *r, if (res && is_fixup(item->command)) { return error_failed_squash(r, item->commit, opts, item->arg_len, arg); - } else if (res && is_rebase_i(opts) && item->commit) { + } else if (res && is_rebase_i(opts)) { int to_amend = 0; struct object_id oid;