]> git.ipfire.org Git - thirdparty/git.git/commit - git-bisect.sh
bisect--helper: `check_and_set_terms` shell function in C
authorPranit Bauva <pranit.bauva@gmail.com>
Wed, 2 Jan 2019 15:38:33 +0000 (07:38 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Jan 2019 18:23:02 +0000 (10:23 -0800)
commit4fbdbd5bfff874330115f8d7556cf7c9f7f138c9
treec4721863fdd2f197af80ea459042083915da64c4
parente3b1e3bdc0aa5fa6a474874a2395ae0584b2aea7
bisect--helper: `check_and_set_terms` shell function in C

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 but its
implementation 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.

Mentored-by: Lars Schneider <larsxschneider@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
Signed-off-by: Tanushree Tumane <tanushreetumane@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/bisect--helper.c
git-bisect.sh