bisect--helper: use `res` instead of return in BISECT_RESET case option
authorPranit Bauva <redacted>
Wed, 3 Feb 2021 21:54:35 +0000 (22:54 +0100)
committerJunio C Hamano <redacted>
Wed, 3 Feb 2021 22:52:09 +0000 (14:52 -0800)
Use `res` variable to store `bisect_reset()` output in BISECT_RESET
case option to make bisect--helper.c more consistent.

Mentored-by: Christian Couder <redacted>
Signed-off-by: Miriam Rubio <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/bisect--helper.c

index 36b50e3aa8ba6e5187bbda125aa1de846fe999b9..fd018ddda5c0121982f4638811b194d6c3907fc6 100644 (file)
@@ -1047,7 +1047,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
        case BISECT_RESET:
                if (argc > 1)
                        return error(_("--bisect-reset requires either no argument or a commit"));
-               return !!bisect_reset(argc ? argv[0] : NULL);
+               res = bisect_reset(argc ? argv[0] : NULL);
+               break;
        case CHECK_AND_SET_TERMS:
                if (argc != 3)
                        return error(_("--check-and-set-terms requires 3 arguments"));
git clone https://git.99rst.org/PROJECT