Thread (8 messages) 8 messages, 1 author, 2021-02-03
STALE2065d

Revision v5 of 4 in this series.

Revisions (4)
  1. v2 [diff vs current]
  2. v3 [diff vs current]
  3. v4 [diff vs current]
  4. v5 current

[PATCH v5 4/7] bisect--helper: use `res` instead of return in BISECT_RESET case option

From: Miriam Rubio <hidden>
Date: 2021-02-03 21:56:29
Subsystem: the rest · Maintainer: Linus Torvalds

From: Pranit Bauva <redacted>

Use `res` variable to store `bisect_reset()` output in BISECT_RESET
case option to make bisect--helper.c more consistent.

Mentored-by: Christian Couder [off-list ref]
Signed-off-by: Miriam Rubio <redacted>
---
 builtin/bisect--helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 36b50e3aa8..fd018ddda5 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"));
-- 
2.29.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help