[PATCH 05/11] sequencer: remove unnecessary "or" in pick_one_commit()
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Jun 30, 2026, 15:28 UTC
- Message-ID
- <cb286ac70d77cdcbb644a34b2fa89663b3c443b9.1782833268.git.phillip.wood@dunelm.org.uk>
- In-Reply-To
- <cover.1782833268.git.phillip.wood@dunelm.org.uk>
From: Phillip Wood <phillip.wood@dunelm.org.uk>
If error_with_patch(..., res, ...) succeeds then it returns "res", if it fails then it returns -1. This means that or-ing the return value with "res" is pointless the result is the same as the return value.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> --- sequencer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sequencer.c b/sequencer.c index d7e439b1feb..39cbb7b6e3e 100644 --- a/sequencer.c +++ b/sequencer.c @@ -5007,9 +5007,8 @@ static int pick_one_commit(struct repository *r, oideq(&opts->squash_onto, &oid)))) to_amend = 1; - return res | error_with_patch(r, item->commit, - arg, item->arg_len, opts, - res, to_amend); + return error_with_patch(r, item->commit, arg, item->arg_len, + opts, res, to_amend); } return res; }
-- 2.54.0.200.gfd8d68259e3