Skip to content

Commit

Permalink
bisect--helper: use res instead of return in BISECT_RESET case option
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pranitbauva1997 authored and gitster committed Feb 3, 2021
1 parent 68efed8 commit b7a6f16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin/bisect--helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit b7a6f16

Please sign in to comment.