[PATCH 15/26] bisect--helper: `bisect_autostart` shell function in C

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_autostart()` shell function in C and add the C implementation from `bisect_next()` which was previously left uncovered. Also add a subcommand `--bisect-autostart` to `git bisect--helper` be called from `bisect_state()` from git-bisect.sh . Using `--bise

[PATCH 13/26] bisect--helper: retire `--bisect-clean-state` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `bisect-clean-state` subcommand is no longer used in the shell script while the C code uses `bisect_clean_state()` thus remove the subcommand. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva Signed-off-by: Tanushree Tumane --- bui

[PATCH 20/26] bisect--helper: `bisect_replay` shell function in C

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_replay` shell function in C and also add `--bisect-replay` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--bisect-replay` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As mo

[PATCH 18/26] bisect--helper: retire `--write-terms` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--write-terms` subcommand is no longer used in the shell script and the function `write_terms()` is called from the C implementation of `set_terms()` and `bisect_start()`. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed

[PATCH 24/26] bisect--helper: remove the dequote in bisect_start()

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Dequoting the arguments was introduced in 25b48b5c to port the function `bisect_next()` but after the `bisect_replay()` porting, the dequoting is carried out itself when it passes the arguments to `bisect_start()` in a simpler way thus dequoting again isn't required. So remove

[PATCH 25/26] bisect--helper: `bisect_skip` shell function in C

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_skip()` shell function in C and also add `bisect-skip` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--bisect-skip` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more fun

[PATCH 26/26] bisect--helper: retire `--check-and-set-terms` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--check-and-set-terms` subcommand is no longer used in the shell script and the function `check_and_set_terms()` is called from the C implementation. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed-off-by: Pranit Bauva

[PATCH 16/26] bisect--helper: `bisect_state` & `bisect_head` shell function in C

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_state()` shell function in C and also add a subcommand `--bisect-state` to `git-bisect--helper` to call it 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

[PATCH 14/26] bisect--helper: retire `--next-all` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--next-all` subcommand is no longer used in the shell script and the function `bisect_next_all()` is called from the C implementation of `bisect_next()`. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva Signed-off-by: Tanushree Tuma

[PATCH 22/26] bisect--helper: retire `--bisect-autostart` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--bisect-autostart` subcommand is no longer used in the shell script and the function `bisect_autostart()` is called from the C implementation. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed-off-by: Pranit Bauva Signe

[PATCH 23/26] bisect--helper: retire `--bisect-auto-next` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--bisect-auto-next` subcommand is no longer used in the shell script and the function `bisect_auto_next()` is called from the C implementation. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed-off-by: Pranit Bauva Signe

[PATCH 19/26] bisect--helper: `bisect_log` shell function in C

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_log()` shell function in C and also add `--bisect-log` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-log` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more fu

[PATCH 17/26] bisect--helper: retire `--check-expected-revs` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--check-expected-revs` subcommand is no longer used in the shell script and the function `check_expected_revs()` is called from the C implementation of `bisect_next()`. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed-of

[PATCH 21/26] bisect--helper: retire `--bisect-write` subcommand

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva The `--bisect-write` subcommand is no longer used in the shell script and the function `bisect_write()` is called from the C implementation. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed-off-by: Pranit Bauva Signed-off-by

[PATCH 10/26] bisect--helper: `bisect_next` and `bisect_auto_next` shell function in C

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_next()` and the `bisect_auto_next()` shell function in C and add the subcommands to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-next` and `--bisect-auto-start` subcommands is a temporary measure to port shell function to C so as

[PATCH 12/26] bisect--helper: dequote arguments in `bisect-start`

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva As more and more calls are happening to the subcommands in `git bisect--helper`, more specifically when `bisect_start $rev` is converted to `git bisect--helper --bisect-start $rev` it is necessary to dequote the arguments because of shell to C conversion. Mentored-by: Christia

[PATCH 09/26] bisect.c: libify `bisect_next_all` and its dependants

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Turn `exit()`

[PATCH 07/26] bisect.c: libify `check_good_are_ancestors_of_bad` and its dependents

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Turn `exit()`

[PATCH 08/26] bisect.c: libify `handle_bad_merge_base` and its dependants

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Turn `exit()`

[PATCH 06/26] bisect.c: libify `check_merge_bases` and its dependents.

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Turn `exit()`

[PATCH 05/26] bisect.c: libify `bisect_checkout` and its dependants

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Turn `exit()`

[PATCH 11/26] bisect--helper: Finish `bisect_start()` conversion

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva With the conversion of `bisect_auto_next()` in previous commit, `bisect_start()` has been successfully ported to C. Add the subcommands to `git bisect--helper` and call it from git-bisect.sh. Remove `bisect_start()` shell method and call `git bisect--helper --bisect-start` s

[PATCH 04/26] bisect.c: libify `exit_if_skipped_commits` to `error_if_skipped...`

2019-02-24 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Since we want to get rid of git-bisect.sh it would be necessary to convert those exit() calls to return statements so that errors can be reported. Emulate try catch in C by converting `exit()` to `return `. Follow POSIX conventions to return to indicate error. Modify `cmd_bis

[PATCH v17 5/7] bisect--helper: `bisect_next_check` shell function in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement `bisect_next_check` shell function in C and add `bisect-next-check` subcommand to `git bisect--helper` to call it from git-bisect.sh . `bisect_voc` shell function is no longer useful now and is replaced by using a char *[] of "new|bad" and "good|old" values. Using

[PATCH v17 6/7] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `get_terms` and `bisect_terms` shell function in C and add `bisect-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-terms` subcommand is a temporary measure to port shell function in C so as to use the existing test suit

[PATCH v17 7/7] bisect--helper: `bisect_start` shell function partially in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_start` shell function partially in C and add `bisect-start` subcommand to `git bisect--helper` to call it from git-bisect.sh . The last part is not converted because it calls another shell function. `bisect_start` shell function will be completed after

[PATCH v17 1/7] bisect--helper: `bisect_reset` shell function in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement `bisect_reset` shell function in C and add a `--bisect-reset` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `bisect_reset` subcommand is a temporary measure to port shell functions to C so as to use the existing test suite. As more functi

[PATCH v17 3/7] wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva is_empty_file() can help to refactor a lot of code. This will be very helpful in porting "git bisect" to C. Suggested-by: Torsten Bögershausen Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva --- builtin/am.c | 20 ++--

[PATCH v17 2/7] bisect--helper: `bisect_write` shell function in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva Reimplement the `bisect_write` shell function in C and add a `bisect-write` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--bisect-write` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more funct

[PATCH v17 4/7] bisect--helper: `check_and_set_terms` shell function in C

2019-01-02 Thread Pranit Bauva via GitGitGadget
From: Pranit Bauva 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 s