Skip to content

Commit 7613ec5

Browse files
pranitbauva1997gitster
authored andcommitted
bisect--helper: return error codes from cmd_bisect__helper()
Since we want to get rid of git-bisect.sh, it would be necessary to convert bisect.c exit() calls to return statements so that errors can be reported. Let's prepare for that by making it possible to return different error codes than just 0 or 1. Different error codes might enable a bisecting script calling the bisect command that uses this function to do different things depending on the exit status of the bisect command. Mentored-by: Christian Couder <[email protected]> Mentored-by: Johannes Schindelin <[email protected]> Signed-off-by: Tanushree Tumane <[email protected]> Signed-off-by: Miriam Rubio <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 680e8a0 commit 7613ec5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/bisect--helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,5 +713,5 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
713713
return error("BUG: unknown subcommand '%d'", cmdmode);
714714
}
715715
free_terms(&terms);
716-
return !!res;
716+
return abs(res);
717717
}

0 commit comments

Comments
 (0)