path: root/builtin
diff options
authorPranit Bauva <>2020-02-17 08:40:33 (GMT)
committerJunio C Hamano <>2020-02-19 17:37:14 (GMT)
commit7613ec594a3cb3a5b67bd4f363a557374e744dfb (patch)
tree1ce3666789d03c15c444928d3c7360319036554a /builtin
parent680e8a01e57cd383048bf4e7d9668ce715d6d649 (diff)
bisect--helper: return error codes from `cmd_bisect__helper()`
Since we want to get rid of, 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 <> Mentored-by: Johannes Schindelin <> Signed-off-by: Tanushree Tumane <> Signed-off-by: Miriam Rubio <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin')
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index e21d3d1..e6bd4d6 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -713,5 +713,5 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
return error("BUG: unknown subcommand '%d'", cmdmode);
- return !!res;
+ return abs(res);