git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Miriam Rubio <mirucam@gmail.com>
Date
Mar 21, 2020, 16:10 UTC
Message-ID
<20200321161020.22817-1-mirucam@gmail.com>

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(-)
-- 
2.25.0
Next: Miriam Rubio
Message 1 of 18 in “Finish converting git bisect to C part 2”
  1. 00/11 Finish converting git bisect to C part 2Miriam Rubio, Mar 21, 2020
  2. 01/11 bisect--helper: fix `cmd_*()` function switch default returnMiriam Rubio, Mar 21, 2020
  3. Junio C HamanoApr 3, 2020
  4. Christian CouderApr 3, 2020
  5. Junio C HamanoApr 3, 2020
  6. 02/11 bisect--helper: introduce new `write_in_file()` functionMiriam Rubio, Mar 21, 2020
  7. Junio C HamanoApr 3, 2020
  8. 03/11 bisect--helper: reimplement `bisect_next` and `bisect_auto_next` shell functions in CMiriam Rubio, Mar 21, 2020
  9. Junio C HamanoApr 3, 2020
  10. Miriam R.Apr 23, 2020
  11. 05/11 bisect--helper: retire `--bisect-clean-state` subcommandMiriam Rubio, Mar 21, 2020
  12. 04/11 bisect--helper: finish porting `bisect_start()` to CMiriam Rubio, Mar 21, 2020
  13. 06/11 bisect--helper: retire `--next-all` subcommandMiriam Rubio, Mar 21, 2020
  14. 10/11 bisect--helper: retire `--write-terms` subcommandMiriam Rubio, Mar 21, 2020
  15. 09/11 bisect--helper: retire `--check-expected-revs` subcommandMiriam Rubio, Mar 21, 2020
  16. 07/11 bisect--helper: reimplement `bisect_autostart` shell function in CMiriam Rubio, Mar 21, 2020
  17. 08/11 bisect--helper: reimplement `bisect_state` & `bisect_head` shell functions in CMiriam Rubio, Mar 21, 2020
  18. 11/11 bisect--helper: retire `--bisect-autostart` subcommandMiriam Rubio, Mar 21, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.