mbox series

[v2,00/11] Finish converting git bisect to C part 2

Message ID 20200321161020.22817-1-mirucam@gmail.com (mailing list archive)
Headers show
Series Finish converting git bisect to C part 2 | expand

Message

Miriam R. March 21, 2020, 4:10 p.m. UTC
These patches correspond to a second part of patch series 
of Outreachy project "Finish converting `git bisect` from shell to C" 
started by Pranit Bauva and Tanushree Tumane
(https://public-inbox.org/git/pull.117.git.gitgitgadget@gmail.com) and
continued by me.

This second part is formed by reimplementations of some `git bisect`
subcommands and removal of other temporary subcommands.

These patch series emails were generated from:
https://gitlab.com/mirucam/git/commits/git-bisect-part2-v2.

I would like to thank Junio Hamano and Johannes Schindelin for their
reviews and suggestions.

--- Changes since v1 Finish converting git bisect to C part 2 patch series ---

General changes
---------------

* Rebase on master branch: 98cedd0233 (Merge https://github.com/prati0100/git-gui, 2020-03-19)

Specific changes
----------------

[1/11] bisect--helper: fix `cmd_*()` function switch default return

* New patch that fixes a return `error()` in a `cmd_*()` function.

[2/11] bisect--helper: introduce new `write_in_file()` function

* Improve commit message.
* Change `write_in_file()` function to avoid extra allocation.
* Adapt new `write_in_file()` call in `write_terms()`.

--

[3/11] bisect--helper: reimplement `bisect_next` and `bisect_auto_next` shell functions in C

* Adapt new `write_in_file()` call in `bisect_successful()`.
* Rewrite `register_good_ref()`
* Adapt `prepare_rev_argv()` to new `register_good_ref()`.
* Use `reset_revision_walk()` to reset flags in `process_skipped_commits()`.
* Add code comment.

--
[7/11] bisect--helper: reimplement `bisect_autostart` shell function in C

* Handle exit first in `bisect_autostart()`.
* Add spaces around a curly brackets.
* Pass NULL instead of argv to `bisect_start()`.

Note to previous reviewers:`bisect_autostart` cannot move to forward-declaration 
location, it would imply many functions relocations.

--

[8/11] bisect--helper: reimplement `bisect_state` & `bisect_head` shell functions in C

* Change `bisect_state()` logic to accept `struct object_id *` as input.
* Rewrite `bisect_state()` function following reviewer suggestions.
* Remove subshell use in `git-bisect.sh`.

Note to previous reviewers: Refactor of check_expected_revs() function 
will be in a separate patch in the next patch series (part 3).


Miriam Rubio (2):
  bisect--helper: fix `cmd_*()` function switch default return
  bisect--helper: introduce new `write_in_file()` function

Pranit Bauva (9):
  bisect--helper: reimplement `bisect_next` and `bisect_auto_next` shell
    functions in C
  bisect--helper: finish porting `bisect_start()` to C
  bisect--helper: retire `--bisect-clean-state` subcommand
  bisect--helper: retire `--next-all` subcommand
  bisect--helper: reimplement `bisect_autostart` shell function in C
  bisect--helper: reimplement `bisect_state` & `bisect_head` shell
    functions in C
  bisect--helper: retire `--check-expected-revs` subcommand
  bisect--helper: retire `--write-terms` subcommand
  bisect--helper: retire `--bisect-autostart` subcommand

 bisect.c                 |  11 ++
 builtin/bisect--helper.c | 377 +++++++++++++++++++++++++++++++++------
 git-bisect.sh            | 145 +--------------
 3 files changed, 346 insertions(+), 187 deletions(-)