Skip to content

Commit 6e08040

Browse files
dschogitster
authored andcommitted
Turn git bisect into a full built-in
Now that the shell script hands off to the `bisect--helper` to do _anything_ (except to show the help), it is but a tiny step to let the helper implement the actual `git bisect` command instead. This retires `git-bisect.sh`, concluding a multi-year journey that many hands helped with, in particular Pranit Bauna, Tanushree Tumane and Miriam Rubio. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cb929ed commit 6e08040

File tree

5 files changed

+4
-42
lines changed

5 files changed

+4
-42
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ THIRD_PARTY_SOURCES =
611611
# interactive shell sessions without exporting it.
612612
unexport CDPATH
613613

614-
SCRIPT_SH += git-bisect.sh
615614
SCRIPT_SH += git-difftool--helper.sh
616615
SCRIPT_SH += git-filter-branch.sh
617616
SCRIPT_SH += git-merge-octopus.sh
@@ -1107,7 +1106,7 @@ BUILTIN_OBJS += builtin/am.o
11071106
BUILTIN_OBJS += builtin/annotate.o
11081107
BUILTIN_OBJS += builtin/apply.o
11091108
BUILTIN_OBJS += builtin/archive.o
1110-
BUILTIN_OBJS += builtin/bisect--helper.o
1109+
BUILTIN_OBJS += builtin/bisect.o
11111110
BUILTIN_OBJS += builtin/blame.o
11121111
BUILTIN_OBJS += builtin/branch.o
11131112
BUILTIN_OBJS += builtin/bugreport.o

builtin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ int cmd_am(int argc, const char **argv, const char *prefix);
116116
int cmd_annotate(int argc, const char **argv, const char *prefix);
117117
int cmd_apply(int argc, const char **argv, const char *prefix);
118118
int cmd_archive(int argc, const char **argv, const char *prefix);
119-
int cmd_bisect__helper(int argc, const char **argv, const char *prefix);
119+
int cmd_bisect(int argc, const char **argv, const char *prefix);
120120
int cmd_blame(int argc, const char **argv, const char *prefix);
121121
int cmd_branch(int argc, const char **argv, const char *prefix);
122122
int cmd_bugreport(int argc, const char **argv, const char *prefix);

builtin/bisect--helper.c renamed to builtin/bisect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ static int bisect_run(struct bisect_terms *terms, const char **argv, int argc)
12991299
return res;
13001300
}
13011301

1302-
int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
1302+
int cmd_bisect(int argc, const char **argv, const char *prefix)
13031303
{
13041304
int res = 0;
13051305
struct bisect_terms terms = { .term_good = NULL, .term_bad = NULL };

git-bisect.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

git.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ static struct cmd_struct commands[] = {
492492
{ "annotate", cmd_annotate, RUN_SETUP | NO_PARSEOPT },
493493
{ "apply", cmd_apply, RUN_SETUP_GENTLY },
494494
{ "archive", cmd_archive, RUN_SETUP_GENTLY },
495-
{ "bisect--helper", cmd_bisect__helper, RUN_SETUP },
495+
{ "bisect", cmd_bisect, RUN_SETUP },
496496
{ "blame", cmd_blame, RUN_SETUP },
497497
{ "branch", cmd_branch, RUN_SETUP | DELAY_PAGER_CONFIG },
498498
{ "bugreport", cmd_bugreport, RUN_SETUP_GENTLY },

0 commit comments

Comments
 (0)