Commit 1fcc40c
committed
bisect: simplify return code from bisect_checkout()
The function was designed to return only BISECT_OK (0) or
BISECT_FAILED (-1) and no other values, but there were two issues:
- The comment misspelled BISECT_FAILED as BISECT_FAILURE, even
though the logic it described (i.e. any non-zero return should be
reported as a single BISECT_FAILED) was correct.
- It took the return value from run_command_v_opt(), and assumed it
was either -1 or 1 upon error, which is not the case; it can relay
errors from wait_or_whine(), which can report exit status of the
child process.
Translate any error return from run_command_v_opt() to BISECT_FAILED,
and simplify the resulting code by losing the 'res' variable that is
no longer needed.
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent ffcb4e9 commit 1fcc40c
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
730 | | - | |
731 | 730 | | |
732 | 731 | | |
733 | 732 | | |
| |||
740 | 739 | | |
741 | 740 | | |
742 | 741 | | |
743 | | - | |
744 | | - | |
| 742 | + | |
745 | 743 | | |
746 | 744 | | |
747 | 745 | | |
748 | | - | |
| 746 | + | |
749 | 747 | | |
750 | | - | |
| 748 | + | |
751 | 749 | | |
752 | 750 | | |
753 | 751 | | |
754 | 752 | | |
755 | 753 | | |
756 | 754 | | |
757 | 755 | | |
758 | | - | |
| 756 | + | |
759 | 757 | | |
760 | 758 | | |
761 | 759 | | |
| |||
0 commit comments