From: Pranit Bauva <pranit.bauva@gmail.com>
To: git@vger.kernel.org
Cc: christian.couder@gmail.com, chriscool@tuxfamily.org,
larsxschneider@gmail.com, Pranit Bauva <pranit.bauva@gmail.com>
Subject: [PATCH 2/2] bisect--helper: `bisect_voc` shell function in C
Date: Sat, 14 May 2016 01:32:17 +0530 [thread overview]
Message-ID: <1463169737-12701-2-git-send-email-pranit.bauva@gmail.com> (raw)
In-Reply-To: <1463169737-12701-1-git-send-email-pranit.bauva@gmail.com>
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@gmail.com>
Mentored-by: Pranit Bauva <pranit.bauva@gmail.com>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
---
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@gmail.com>
---
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
next prev parent reply other threads:[~2016-05-13 20:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 20:02 [PATCH 1/2] bisect--helper: `bisect_log` shell function in C Pranit Bauva
2016-05-13 20:02 ` Pranit Bauva [this message]
2016-05-13 20:07 ` [PATCH 2/2] bisect--helper: `bisect_voc` " Pranit Bauva
2016-05-16 6:40 ` Johannes Schindelin
2016-05-20 7:23 ` Pranit Bauva
2016-05-22 19:49 ` Pranit Bauva
2016-05-23 11:09 ` Johannes Schindelin
2016-05-16 7:49 ` Matthieu Moy
2016-05-16 7:36 ` [PATCH 1/2] bisect--helper: `bisect_log` " Eric Sunshine
2016-05-20 7:28 ` Pranit Bauva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463169737-12701-2-git-send-email-pranit.bauva@gmail.com \
--to=pranit.bauva@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=larsxschneider@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).