bisect--helper: reimplement `bisect_state` & `bisect_head` shell functions in C
authorPranit Bauva <redacted>
Thu, 15 Oct 2020 13:38:35 +0000 (15:38 +0200)
committerJunio C Hamano <redacted>
Fri, 16 Oct 2020 19:24:20 +0000 (12:24 -0700)
commit27257bc4661ed7ffb715922693c7a2bee136824c
treeb40014df93e1e2c65f5c66c6aac9bace28c1610e
parent04774b4e7090e6b418ab053a6d4412a665cae703
bisect--helper: reimplement `bisect_state` & `bisect_head` shell functions in C

Reimplement the `bisect_state()` shell functions in C and also add a
subcommand `--bisect-state` to `git-bisect--helper` to call them from
git-bisect.sh .

Using `--bisect-state` subcommand 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_head()` is only called from `bisect_state()`, thus it is not
required to introduce another subcommand.

Note that the `eval` in the changed line of `git-bisect.sh` cannot be
dropped: it is necessary because the `rev` and the `tail`
variables may contain multiple, quoted arguments that need to be
passed to `bisect--helper` (without the quotes, naturally).

Mentored-by: Lars Schneider <redacted>
Mentored-by: Christian Couder <redacted>
Mentored-by: Johannes Schindelin <redacted>
Signed-off-by: Pranit Bauva <redacted>
Signed-off-by: Tanushree Tumane <redacted>
Signed-off-by: Miriam Rubio <redacted>
Reviewed-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/bisect--helper.c
git-bisect.sh
git clone https://git.99rst.org/PROJECT