git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC/PATCH 1/3] bisect--helper: `check_and_set_terms` shell function in C
@ 2016-06-26 20:44 Pranit Bauva
  2016-06-26 20:44 ` [RFC/PATCH 2/3] bisect--helper: `bisect_next_check` " Pranit Bauva
  2016-06-26 20:44 ` [RFC/PATCH 3/3] bisect--helper: `get_terms` & `bisect_terms` " Pranit Bauva
  0 siblings, 2 replies; 3+ messages in thread
From: Pranit Bauva @ 2016-06-26 20:44 UTC (permalink / raw
  To: git; +Cc: Pranit Bauva, Matthie.Moy, christian.couder, chriscool, gitster

Reimplement the `check_and_set_terms` shell function in C and add
`check-and-set-terms` subcommand to `git bisect--helper` to call it from
git-bisect.sh

Using `--check-and-set-terms` subcommand is a temporary measure to port
shell function in C so as to use the existing test suite. As more
functions are ported, this subcommand will be retired and will be called
by some other methods.

check_and_set_terms() sets and receives two global variables namely
TERM_GOOD and TERM_BAD in the shell script. Luckily the file BISECT_TERMS
also contains the value of those variables so its appropriate to evoke the
method get_terms() after calling the subcommand so that it retrieves the
value of TERM_GOOD and TERM_BAD from the file BISECT_TERMS. The two
global variables are passed as arguments to the subcommand.

Also introduce bisect_terms_reinit() to release the previous memory of
struct bisect_terms and allocate new memory for it thus flushing out the
previous contents.

Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
---
This series applies on top of my previous patch series[1].

[1]: http://thread.gmane.org/gmane.comp.version-control.git/298263

 builtin/bisect--helper.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++-
 git-bisect.sh            | 36 ++++----------------------------
 2 files changed, 56 insertions(+), 33 deletions(-)

diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index e946ba9..c387697 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -45,6 +45,13 @@ static int bisect_terms_release(struct bisect_terms *term)
 	return 0;
 }
 
+static int bisect_terms_reinit(struct bisect_terms *term)
+{
+	bisect_terms_release(term);
+	bisect_terms_init(term);
+	return 0;
+}
+
 /*
  * Check whether the string `term` belongs to the set of strings
  * included in the variable arguments.
@@ -254,6 +261,40 @@ static int bisect_write(const char *state, const char *rev,
 	return 0;
 }
 
+static int check_and_set_terms(const char *cmd, struct bisect_terms *term)
+{
+	if (one_of(cmd, "skip", "start", "terms", NULL))
+		return 0;
+
+	if (!is_empty_or_missing_file(git_path_bisect_write_terms()) &&
+	    strcmp(cmd, term->term_bad.buf) && strcmp(cmd, term->term_good.buf))
+		return error(_("Invalid command: you're currently in a"
+				"'%s' '%s' bisect"), term->term_bad.buf,
+				term->term_good.buf);
+
+	if (one_of(cmd, "bad", "good", NULL)) {
+		if (is_empty_or_missing_file(git_path_bisect_write_terms())) {
+			bisect_terms_reinit(term);
+			strbuf_addstr(&term->term_bad, "bad");
+			strbuf_addstr(&term->term_good, "good");
+			return write_terms(term->term_bad.buf,
+					   term->term_good.buf);
+		}
+	}
+
+	if (one_of(cmd, "new", "old", NULL)) {
+		if (is_empty_or_missing_file(git_path_bisect_write_terms())) {
+			bisect_terms_reinit(term);
+			strbuf_addstr(&term->term_bad, "new");
+			strbuf_addstr(&term->term_good, "old");
+			return write_terms(term->term_bad.buf,
+					   term->term_good.buf);
+		}
+	}
+
+	return 0;
+}
+
 int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 {
 	enum {
@@ -262,7 +303,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 		BISECT_CLEAN_STATE,
 		BISECT_RESET,
 		CHECK_EXPECTED_REVS,
-		BISECT_WRITE
+		BISECT_WRITE,
+		CHECK_AND_SET_TERMS
 	} cmdmode = 0;
 	int no_checkout = 0, res = 0;
 	struct option options[] = {
@@ -278,6 +320,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 			 N_("check for expected revs"), CHECK_EXPECTED_REVS),
 		OPT_CMDMODE(0, "bisect-write", &cmdmode,
 			 N_("write out the bisection state in BISECT_LOG"), BISECT_WRITE),
+		OPT_CMDMODE(0, "check-and-set-terms", &cmdmode,
+			 N_("check and set terms in a bisection state"), CHECK_AND_SET_TERMS),
 		OPT_BOOL(0, "no-checkout", &no_checkout,
 			 N_("update BISECT_HEAD instead of checking out the current commit")),
 		OPT_END()
@@ -321,6 +365,13 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 		strbuf_addstr(&state.term_bad, argv[3]);
 		res = bisect_write(argv[0], argv[1], &state, nolog);
 		break;
+	case CHECK_AND_SET_TERMS:
+		if (argc != 3)
+			die(_("--check-and-set-terms requires 3 arguments"));
+		strbuf_addstr(&state.term_good, argv[1]);
+		strbuf_addstr(&state.term_bad, argv[2]);
+		res = check_and_set_terms(argv[0], &state);
+		break;
 	default:
 		die("BUG: unknown subcommand '%d'", cmdmode);
 	}
diff --git a/git-bisect.sh b/git-bisect.sh
index b9896a4..63ae742 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -239,7 +239,8 @@ bisect_skip() {
 bisect_state() {
 	bisect_autostart
 	state=$1
-	check_and_set_terms $state
+	git bisect--helper --check-and-set-terms $state $TERM_GOOD $TERM_BAD
+	get_terms
 	case "$#,$state" in
 	0,*)
 		die "$(gettext "Please call 'bisect_state' with at least one argument.")" ;;
@@ -390,7 +391,8 @@ bisect_replay () {
 			command="$bisect"
 		fi
 		get_terms
-		check_and_set_terms "$command"
+		git bisect--helper --check-and-set-terms "$command" "$TERM_GOOD" "$TERM_BAD" || exit
+		get_terms
 		case "$command" in
 		start)
 			cmd="bisect_start $rev"
@@ -480,36 +482,6 @@ get_terms () {
 	fi
 }
 
-check_and_set_terms () {
-	cmd="$1"
-	case "$cmd" in
-	skip|start|terms) ;;
-	*)
-		if test -s "$GIT_DIR/BISECT_TERMS" && test "$cmd" != "$TERM_BAD" && test "$cmd" != "$TERM_GOOD"
-		then
-			die "$(eval_gettext "Invalid command: you're currently in a \$TERM_BAD/\$TERM_GOOD bisect.")"
-		fi
-		case "$cmd" in
-		bad|good)
-			if ! test -s "$GIT_DIR/BISECT_TERMS"
-			then
-				TERM_BAD=bad
-				TERM_GOOD=good
-				git bisect--helper --write-terms "$TERM_BAD" "$TERM_GOOD" || exit
-			fi
-			;;
-		new|old)
-			if ! test -s "$GIT_DIR/BISECT_TERMS"
-			then
-				TERM_BAD=new
-				TERM_GOOD=old
-				git bisect--helper --write-terms "$TERM_BAD" "$TERM_GOOD" || exit
-			fi
-			;;
-		esac ;;
-	esac
-}
-
 bisect_voc () {
 	case "$1" in
 	bad) echo "bad|new" ;;
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [RFC/PATCH 2/3] bisect--helper: `bisect_next_check` shell function in C
  2016-06-26 20:44 [RFC/PATCH 1/3] bisect--helper: `check_and_set_terms` shell function in C Pranit Bauva
@ 2016-06-26 20:44 ` Pranit Bauva
  2016-06-26 20:44 ` [RFC/PATCH 3/3] bisect--helper: `get_terms` & `bisect_terms` " Pranit Bauva
  1 sibling, 0 replies; 3+ messages in thread
From: Pranit Bauva @ 2016-06-26 20:44 UTC (permalink / raw
  To: git; +Cc: Pranit Bauva, Matthie.Moy, christian.couder, chriscool, gitster

Reimplement `bisect_next_check` shell function in C and add
`bisect-next-check` subcommand to `git bisect--helper` to call it from
git-bisect.sh .

Using `--bisect-next-check` is a temporary measure to port shell
function to C so as to use the existing test suite. As more functions
are ported, this subcommand will be retired and will be called by some
other methods.

bisect_voc() is removed as it is redundant and does not serve any useful
purpose. We are better off specifying "bad|new" "good|old" as and when
we require in bisect_next_check().

Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
---
 builtin/bisect--helper.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++-
 git-bisect.sh            | 60 +++---------------------------------
 2 files changed, 83 insertions(+), 57 deletions(-)

diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index c387697..9a289a1 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -6,6 +6,7 @@
 #include "dir.h"
 #include "argv-array.h"
 #include "run-command.h"
+#include "prompt.h"
 
 static GIT_PATH_FUNC(git_path_bisect_write_terms, "BISECT_TERMS")
 static GIT_PATH_FUNC(git_path_bisect_expected_rev, "BISECT_EXPECTED_REV")
@@ -23,6 +24,7 @@ static const char * const git_bisect_helper_usage[] = {
 	N_("git bisect--helper --bisect-clean-state"),
 	N_("git bisect--helper --bisect-reset [<commit>]"),
 	N_("git bisect--helper --bisect-write <state> <revision> <TERM_GOOD> <TERM_BAD> [<nolog>]"),
+	N_("git bisect--helper --bisect-next-check [<term>] <TERM_GOOD> <TERM_BAD"),
 	NULL
 };
 
@@ -295,6 +297,68 @@ static int check_and_set_terms(const char *cmd, struct bisect_terms *term)
 	return 0;
 }
 
+static int mark_good(const char *refname, const struct object_id *oid,
+		     int flag, void *cb_data)
+{
+	int *m_good = (int *)cb_data;
+	*m_good = 0;
+	return 0;
+}
+
+static int bisect_next_check(const struct bisect_terms *state, const char *term)
+{
+	int missing_good = 1, missing_bad = 1;
+	char *bad_ref = xstrfmt("refs/bisect/%s", state->term_bad.buf);
+	char *good_ref = xstrfmt("%s*", state->term_good.buf);
+	if (ref_exists(bad_ref))
+		missing_bad = 0;
+
+	for_each_glob_ref_in(mark_good, good_ref, "refs/bisect/",
+			     (void *) &missing_good);
+	free(good_ref);
+	free(bad_ref);
+
+	if (!missing_good && !missing_bad)
+		return 0;
+
+	if (!term)
+		return -1;
+
+	if (missing_good && !missing_bad && term && !strcmp(term, state->term_good.buf)) {
+		char *yesno;
+		/*
+		 * have bad (or new) but not good (or old). We could bisect
+		 * although this is less optimum.
+		 */
+		fprintf(stderr, "Warning: bisecting only with a %s commit\n",
+			state->term_bad.buf);
+		if (!isatty(0))
+			return 0;
+		/*
+		 * TRANSLATORS: Make sure to include [Y] and [n] in your
+		 * translation. The program will only accept English input
+		 * at this point.
+		 */
+		yesno = git_prompt(_("Are you sure [Y/n]? "), PROMPT_ECHO);
+		if (starts_with(yesno, "N") || starts_with(yesno, "n"))
+			return -1;
+		return 0;
+	}
+	if (!is_empty_or_missing_file(git_path_bisect_start()))
+		return error(_("You need to give me at least one good|old and "
+				"bad|new revision. You can use \"git bisect "
+				"bad|new\" and \"git bisect good|old\" for "
+				"that. \n"));
+	else
+		return error(_("You need to start by \"git bisect start\". "
+				"You then need to give me at least one good|"
+				"old and bad|new revision. You can use \"git "
+				"bisect bad|new\" and \"git bisect good|old\" "
+				" for that.\n"));
+
+	return 0;
+}
+
 int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 {
 	enum {
@@ -304,7 +368,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 		BISECT_RESET,
 		CHECK_EXPECTED_REVS,
 		BISECT_WRITE,
-		CHECK_AND_SET_TERMS
+		CHECK_AND_SET_TERMS,
+		BISECT_NEXT_CHECK
 	} cmdmode = 0;
 	int no_checkout = 0, res = 0;
 	struct option options[] = {
@@ -322,6 +387,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 			 N_("write out the bisection state in BISECT_LOG"), BISECT_WRITE),
 		OPT_CMDMODE(0, "check-and-set-terms", &cmdmode,
 			 N_("check and set terms in a bisection state"), CHECK_AND_SET_TERMS),
+		OPT_CMDMODE(0, "bisect-next-check", &cmdmode,
+			 N_("check whether bad or good terms exist"), BISECT_NEXT_CHECK),
 		OPT_BOOL(0, "no-checkout", &no_checkout,
 			 N_("update BISECT_HEAD instead of checking out the current commit")),
 		OPT_END()
@@ -372,6 +439,17 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 		strbuf_addstr(&state.term_bad, argv[2]);
 		res = check_and_set_terms(argv[0], &state);
 		break;
+	case BISECT_NEXT_CHECK:
+		if (argc != 2 && argc != 3)
+			die(_("--bisect-next-check requires 2 or 3 arguments"));
+		strbuf_addstr(&state.term_good, argv[0]);
+		strbuf_addstr(&state.term_bad, argv[1]);
+		if (argc == 2) {
+			res = bisect_next_check(&state, NULL);
+			break;
+		}
+		res = bisect_next_check(&state, argv[2]);
+		break;
 	default:
 		die("BUG: unknown subcommand '%d'", cmdmode);
 	}
diff --git a/git-bisect.sh b/git-bisect.sh
index 63ae742..51b0a6b 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -271,59 +271,14 @@ bisect_state() {
 	bisect_auto_next
 }
 
-bisect_next_check() {
-	missing_good= missing_bad=
-	git show-ref -q --verify refs/bisect/$TERM_BAD || missing_bad=t
-	test -n "$(git for-each-ref "refs/bisect/$TERM_GOOD-*")" || missing_good=t
-
-	case "$missing_good,$missing_bad,$1" in
-	,,*)
-		: have both $TERM_GOOD and $TERM_BAD - ok
-		;;
-	*,)
-		# do not have both but not asked to fail - just report.
-		false
-		;;
-	t,,"$TERM_GOOD")
-		# have bad (or new) but not good (or old).  we could bisect although
-		# this is less optimum.
-		eval_gettextln "Warning: bisecting only with a \$TERM_BAD commit." >&2
-		if test -t 0
-		then
-			# TRANSLATORS: Make sure to include [Y] and [n] in your
-			# translation. The program will only accept English input
-			# at this point.
-			gettext "Are you sure [Y/n]? " >&2
-			read yesno
-			case "$yesno" in [Nn]*) exit 1 ;; esac
-		fi
-		: bisect without $TERM_GOOD...
-		;;
-	*)
-		bad_syn=$(bisect_voc bad)
-		good_syn=$(bisect_voc good)
-		if test -s "$GIT_DIR/BISECT_START"
-		then
-
-			eval_gettextln "You need to give me at least one \$bad_syn and one \$good_syn revision.
-(You can use \"git bisect \$bad_syn\" and \"git bisect \$good_syn\" for that.)" >&2
-		else
-			eval_gettextln "You need to start by \"git bisect start\".
-You then need to give me at least one \$good_syn and one \$bad_syn revision.
-(You can use \"git bisect \$bad_syn\" and \"git bisect \$good_syn\" for that.)" >&2
-		fi
-		exit 1 ;;
-	esac
-}
-
 bisect_auto_next() {
-	bisect_next_check && bisect_next || :
+	git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD && bisect_next || :
 }
 
 bisect_next() {
 	case "$#" in 0) ;; *) usage ;; esac
 	bisect_autostart
-	bisect_next_check $TERM_GOOD
+	git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD $TERM_GOOD|| exit
 
 	# Perform all bisection computation, display and checkout
 	git bisect--helper --next-all $(test -f "$GIT_DIR/BISECT_HEAD" && echo --no-checkout)
@@ -355,7 +310,7 @@ bisect_next() {
 }
 
 bisect_visualize() {
-	bisect_next_check fail
+	git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD fail || exit
 
 	if test $# = 0
 	then
@@ -409,7 +364,7 @@ bisect_replay () {
 }
 
 bisect_run () {
-	bisect_next_check fail
+	git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD fail || exit
 
 	while true
 	do
@@ -482,13 +437,6 @@ get_terms () {
 	fi
 }
 
-bisect_voc () {
-	case "$1" in
-	bad) echo "bad|new" ;;
-	good) echo "good|old" ;;
-	esac
-}
-
 bisect_terms () {
 	get_terms
 	if ! test -s "$GIT_DIR/BISECT_TERMS"
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [RFC/PATCH 3/3] bisect--helper: `get_terms` & `bisect_terms` shell function in C
  2016-06-26 20:44 [RFC/PATCH 1/3] bisect--helper: `check_and_set_terms` shell function in C Pranit Bauva
  2016-06-26 20:44 ` [RFC/PATCH 2/3] bisect--helper: `bisect_next_check` " Pranit Bauva
@ 2016-06-26 20:44 ` Pranit Bauva
  1 sibling, 0 replies; 3+ messages in thread
From: Pranit Bauva @ 2016-06-26 20:44 UTC (permalink / raw
  To: git; +Cc: Pranit Bauva, Matthie.Moy, christian.couder, chriscool, gitster

Reimplement the `get_terms` and `bisect_terms` shell function in C and
add `bisect-terms` subcommand to `git bisect--helper` to call it from
git-bisect.sh .

Using `--bisect-terms` subcommand is a temporary measure to port shell
function in C so as to use the existing test suite. As more functions
are ported, this subcommand will be retired and will be called by some
other methods.

Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
---
 builtin/bisect--helper.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++-
 git-bisect.sh            | 35 ++--------------------------------
 2 files changed, 50 insertions(+), 34 deletions(-)

diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 9a289a1..51a408c 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -359,6 +359,41 @@ static int bisect_next_check(const struct bisect_terms *state, const char *term)
 	return 0;
 }
 
+static int get_terms(struct bisect_terms *term)
+{
+	FILE *fp;
+	fp = fopen(git_path_bisect_write_terms(), "r");
+	if (!fp)
+		return -1;
+
+	bisect_terms_reinit(term);
+	if (strbuf_getline(&term->term_bad, fp) == EOF)
+		return -1;
+	if (strbuf_getline(&term->term_good, fp) == EOF)
+		return -1;
+	return 0;
+}
+
+static int bisect_terms(struct bisect_terms *term, const char *arg)
+{
+	if (get_terms(term)) {
+		fprintf(stderr, "no terms defined\n");
+		return -1;
+	}
+	if (!arg) {
+		printf("Your current terms are %s for the old state\nand "
+		       "%s for the new state.\n", term->term_good.buf,
+		       term->term_bad.buf);
+		return 0;
+	}
+	if (one_of(arg, "--term-good", "--term-old", NULL))
+		printf("%s\n", term->term_good.buf);
+	if (one_of(arg, "--term-bad", "--term-new", NULL))
+		printf("%s\n", term->term_bad.buf);
+
+	return 0;
+}
+
 int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 {
 	enum {
@@ -369,7 +404,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 		CHECK_EXPECTED_REVS,
 		BISECT_WRITE,
 		CHECK_AND_SET_TERMS,
-		BISECT_NEXT_CHECK
+		BISECT_NEXT_CHECK,
+		BISECT_TERMS
 	} cmdmode = 0;
 	int no_checkout = 0, res = 0;
 	struct option options[] = {
@@ -389,6 +425,12 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 			 N_("check and set terms in a bisection state"), CHECK_AND_SET_TERMS),
 		OPT_CMDMODE(0, "bisect-next-check", &cmdmode,
 			 N_("check whether bad or good terms exist"), BISECT_NEXT_CHECK),
+		OPT_CMDMODE(0, "bisect-terms", &cmdmode,
+			 N_("print out the bisect terms"), BISECT_TERMS),
+		OPT_ARGUMENT("term-bad", "handle this in an individual function"),
+		OPT_ARGUMENT("term-good", "handle this in an individual function"),
+		OPT_ARGUMENT("term-new", "handle this in an individual function"),
+		OPT_ARGUMENT("term-old", "handle this in an individual function"),
 		OPT_BOOL(0, "no-checkout", &no_checkout,
 			 N_("update BISECT_HEAD instead of checking out the current commit")),
 		OPT_END()
@@ -450,6 +492,11 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
 		}
 		res = bisect_next_check(&state, argv[2]);
 		break;
+	case BISECT_TERMS:
+		if (argc != 0 && argc != 1)
+			die(_("--bisect-terms requires 0 or 1 argument"));
+		res = bisect_terms(&state, argc ? argv[0] : NULL);
+		break;
 	default:
 		die("BUG: unknown subcommand '%d'", cmdmode);
 	}
diff --git a/git-bisect.sh b/git-bisect.sh
index 51b0a6b..5723601 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -355,7 +355,7 @@ bisect_replay () {
 		"$TERM_GOOD"|"$TERM_BAD"|skip)
 			git bisect--helper --bisect-write "$command" "$rev" "$TERM_GOOD" "$TERM_BAD" || exit;;
 		terms)
-			bisect_terms $rev ;;
+			git bisect--helper --bisect-terms $rev ;;
 		*)
 			die "$(gettext "?? what are you talking about?")" ;;
 		esac
@@ -437,37 +437,6 @@ get_terms () {
 	fi
 }
 
-bisect_terms () {
-	get_terms
-	if ! test -s "$GIT_DIR/BISECT_TERMS"
-	then
-		die "$(gettext "no terms defined")"
-	fi
-	case "$#" in
-	0)
-		gettextln "Your current terms are $TERM_GOOD for the old state
-and $TERM_BAD for the new state."
-		;;
-	1)
-		arg=$1
-		case "$arg" in
-			--term-good|--term-old)
-				printf '%s\n' "$TERM_GOOD"
-				;;
-			--term-bad|--term-new)
-				printf '%s\n' "$TERM_BAD"
-				;;
-			*)
-				die "$(eval_gettext "invalid argument \$arg for 'git bisect terms'.
-Supported options are: --term-good|--term-old and --term-bad|--term-new.")"
-				;;
-		esac
-		;;
-	*)
-		usage ;;
-	esac
-}
-
 case "$#" in
 0)
 	usage ;;
@@ -498,7 +467,7 @@ case "$#" in
 	run)
 		bisect_run "$@" ;;
 	terms)
-		bisect_terms "$@" ;;
+		git bisect--helper --bisect-terms "$@" ;;
 	*)
 		usage ;;
 	esac
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-26 20:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-26 20:44 [RFC/PATCH 1/3] bisect--helper: `check_and_set_terms` shell function in C Pranit Bauva
2016-06-26 20:44 ` [RFC/PATCH 2/3] bisect--helper: `bisect_next_check` " Pranit Bauva
2016-06-26 20:44 ` [RFC/PATCH 3/3] bisect--helper: `get_terms` & `bisect_terms` " Pranit Bauva

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).