]> git.ipfire.org Git - thirdparty/git.git/commitdiff
sequencer: remove unnecessary "or" in pick_one_commit()
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Tue, 30 Jun 2026 15:28:55 +0000 (16:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Jun 2026 19:03:14 +0000 (12:03 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c

index d7e439b1feb38353cefa1c3ea7a594250a9bc3e7..39cbb7b6e3e20a64a3482ed0222cae50c291f027 100644 (file)
@@ -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;
 }