Subject: Re: [PATCH v2 11/11] Turn `git bisect` into a full built-in

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Fri, 11 Nov 2022 14:53:19 +0100

On Thu, Nov 10 2022, Đoàn Trần Công Danh wrote:

> From: Johannes Schindelin <[email-masked]>
>
> 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-masked]>
> Signed-off-by: Junio C Hamano <[email-masked]>
> Signed-off-by: Đoàn Trần Công Danh <[email-masked]>
> ---
>  Makefile                               | 3 +--
>  builtin.h                              | 2 +-
>  builtin/{bisect--helper.c => bisect.c} | 2 +-
>  git.c                                  | 2 +-
>  4 files changed, 4 insertions(+), 5 deletions(-)
>  rename builtin/{bisect--helper.c => bisect.c} (99%)
>
> diff --git a/Makefile b/Makefile
> index 4927379184..78785c6b84 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -627,7 +627,6 @@ THIRD_PARTY_SOURCES =
>  # interactive shell sessions without exporting it.
>  unexport CDPATH
>  
> -SCRIPT_SH += git-bisect.sh
>  SCRIPT_SH += git-difftool--helper.sh
>  SCRIPT_SH += git-filter-branch.sh
>  SCRIPT_SH += git-merge-octopus.sh

This is missing a "git rm git-bisect.sh", which should be part of this
commit.

Do we have a test for at least the exit code of "git bisect -h"? I think
not, because before this it would have been (from skimming
git-sh-setup.sh) 1, but 129 after.

The new exit code is better, but let's test that. For some exitsing tests:

	git grep 'test_expect_code 129 .*-h'