From: Junio C Hamano Date: Tue, 30 Jun 2026 19:09:48 +0000 (-0700) Subject: amend! sequencer: simplify pick_one_commit() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20a5c340cd1d3e9f026bebf24a1e2bc591af681f;p=thirdparty%2Fgit.git amend! sequencer: simplify pick_one_commit() sequencer: simplify pick_one_commit() Unless we're rebasing all we do in pick_one_commit() is call do_pick_commit() and return its result. Simplify the code by returning early if we're not rebasing so that we don't have to continually call is_rebase_i() in the rest of the function. Note that there are a couple of conditions that do not call is_rebase_i() but they check for either an "edit" or a "fixup" command, both of which imply we're rebasing. As the conditional blocks are all mutually exclusive (either the conditions are mutually exclusive, or an earlier conditional block that would match a later one contains a "return" statement) chain them together with "else if" to make that clear. Signed-off-by: Phillip Wood Signed-off-by: Junio C Hamano ---