summaryrefslogtreecommitdiff
path: root/builtin/bisect--helper.c
diff options
context:
space:
mode:
authorPranit Bauva <pranit.bauva@gmail.com>2021-02-03 21:54:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-03 22:52:09 (GMT)
commitb7a6f163d6273896e4f846f63dd711be0174522b (patch)
tree9edd3ed8cfd11e2da5ef943b51269ea829f73561 /builtin/bisect--helper.c
parent68efed8c8a43ad95f4e517ea60034179418dd8bc (diff)
downloadgit-b7a6f163d6273896e4f846f63dd711be0174522b.zip
git-b7a6f163d6273896e4f846f63dd711be0174522b.tar.gz
git-b7a6f163d6273896e4f846f63dd711be0174522b.tar.bz2
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>
Diffstat (limited to 'builtin/bisect--helper.c')
-rw-r--r--builtin/bisect--helper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 36b50e3..fd018dd 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -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"));