bisect--helper: use `res` instead of return in BISECT_RESET case option
Use `res` variable to store `bisect_reset()` output in BISECT_RESET case option to make bisect--helper.c more consistent. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Miriam Rubio <mirucam@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pranit Bauva committed
Feb 3, 2021 at 22:54 UTC
b7a6f163d6273896e4f846f63dd711be0174522b
1 file changed
+2
-1
builtin/bisect--helper.c
+2
-1
@@ -1047,7 +1047,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
1047
case BISECT_RESET:
1048
if (argc > 1)
1049
return error(_("--bisect-reset requires either no argument or a commit"));
1050
- return !!bisect_reset(argc ? argv[0] : NULL);
1050
+ res = bisect_reset(argc ? argv[0] : NULL);
1051
+ break;
1052
case CHECK_AND_SET_TERMS:
1053
if (argc != 3)
1054
return error(_("--check-and-set-terms requires 3 arguments"));