]> git.ipfire.org Git - thirdparty/git.git/commitdiff
sequencer: remove unnecessary "or" in pick_one_commit()
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Wed, 15 Jul 2026 15:21:58 +0000 (16:21 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jul 2026 19:16:21 +0000 (12:16 -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 as 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 1db844100ad0df9b42844d0d7f2caf4df63f0186..70e12eab0ecf31173b75664e4365581fa41a9397 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;
 }