Skip to content

Commit d34155f

Browse files
pranitbauva1997gitster
authored andcommitted
bisect--helper: retire --write-terms subcommand
The `--write-terms` subcommand is no longer used from the git-bisect.sh shell script. Instead the function `write_terms()` is called from the C implementation of `set_terms()` and `bisect_start()`. Mentored-by: Lars Schneider <[email protected]> Mentored-by: Christian Couder <[email protected]> Mentored-by: Johannes Schindelin <[email protected]> Signed-off-by: Pranit Bauva <[email protected]> Signed-off-by: Tanushree Tumane <[email protected]> Signed-off-by: Miriam Rubio <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5feb3df commit d34155f

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

builtin/bisect--helper.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ static GIT_PATH_FUNC(git_path_bisect_names, "BISECT_NAMES")
2020
static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT")
2121

2222
static const char * const git_bisect_helper_usage[] = {
23-
N_("git bisect--helper --write-terms <bad_term> <good_term>"),
2423
N_("git bisect--helper --bisect-reset [<commit>]"),
2524
N_("git bisect--helper --bisect-write [--no-log] <state> <revision> <good_term> <bad_term>"),
2625
N_("git bisect--helper --bisect-check-and-set-terms <command> <good_term> <bad_term>"),
@@ -908,8 +907,7 @@ static enum bisect_error bisect_state(struct bisect_terms *terms, const char **a
908907
int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
909908
{
910909
enum {
911-
WRITE_TERMS = 1,
912-
BISECT_RESET,
910+
BISECT_RESET = 1,
913911
BISECT_WRITE,
914912
CHECK_AND_SET_TERMS,
915913
BISECT_NEXT_CHECK,
@@ -922,8 +920,6 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
922920
} cmdmode = 0;
923921
int res = 0, nolog = 0;
924922
struct option options[] = {
925-
OPT_CMDMODE(0, "write-terms", &cmdmode,
926-
N_("write the terms to .git/BISECT_TERMS"), WRITE_TERMS),
927923
OPT_CMDMODE(0, "bisect-reset", &cmdmode,
928924
N_("reset the bisection state"), BISECT_RESET),
929925
OPT_CMDMODE(0, "bisect-write", &cmdmode,
@@ -958,10 +954,6 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
958954
usage_with_options(git_bisect_helper_usage, options);
959955

960956
switch (cmdmode) {
961-
case WRITE_TERMS:
962-
if (argc != 2)
963-
return error(_("--write-terms requires two arguments"));
964-
return write_terms(argv[0], argv[1]);
965957
case BISECT_RESET:
966958
if (argc > 1)
967959
return error(_("--bisect-reset requires either no argument or a commit"));

0 commit comments

Comments
 (0)