[PATCH 2/2] bisect--helper: `bisect_voc` shell function in C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reimplement the `bisect_voc` shell function in C. This is a too small
function to be called as a subcommand though the working of this
function has been tested by calling it as a subcommand.

Mentored-by: Lars Schneider <larsxschneider@xxxxxxxxx>
Mentored-by: Pranit Bauva <pranit.bauva@xxxxxxxxx>
Signed-off-by: Pranit Bauva <pranit.bauva@xxxxxxxxx>

---
The PR for testing of this function by the subcommand approach can be
found at:
https://github.com/pranitbauva1997/git/pull/5

Signed-off-by: Pranit Bauva <pranit.bauva@xxxxxxxxx>
---
 builtin/bisect--helper.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 87764fe..455f1cb 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -94,6 +94,16 @@ int bisect_log(void)
 	return 0;
 }
 
+int bisect_voc(const char *term)
+{
+	if (!strcmp(term, "bad"))
+		printf("bad|new\n");
+	if (!strcmp(term, "good"))
+		printf("good|old\n");
+
+	return 0;
+}
+
 int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 {
 	enum {
-- 
2.8.2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]