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

Re: [PATCH v3 2/7] bisect--helper: reimplement `bisect_replay` shell function in C

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 24, 2021, 00:22 UTC
Message-ID
<xmqq35yr2nh0.fsf@gitster.c.googlers.com>
In-Reply-To
<20210123154056.48234-3-mirucam@gmail.com>
Miriam Rubio <mirucam@gmail.com> writes:
Show 17 quoted lines
> From: Pranit Bauva <pranit.bauva@gmail.com>
>
> 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
> ...
> +static int process_replay_line(struct bisect_terms *terms, struct strbuf *line)
> +{
> +	const char *p = line->buf + strspn(line->buf, " \t");
> +
> +	if ((!skip_prefix(p, "git bisect", &p) &&
> +	!skip_prefix(p, "git-bisect", &p)) || !isspace(*p))
> +		return 0;
> +	p += strspn(p, " \t");
> +
> +	char *word_end = (char*)p + strcspn(p, " \t");
> +	char *rev = word_end + strspn(word_end, " \t");
Are these lines new in this round?
These break builds with -Werror=declaration-after-statement.
Previous: Miriam RubioNext: Junio C Hamano
Message 9 of 19 in “Finish converting git bisect to C part 3”
  1. 0/7 Finish converting git bisect to C part 3Miriam Rubio, Jan 23, 2021
  2. 1/7 bisect--helper: reimplement `bisect_log` shell function in CMiriam Rubio, Jan 23, 2021
  3. Rafael SilvaJan 24, 2021
  4. Miriam R.Jan 25, 2021
  5. Junio C HamanoJan 26, 2021
  6. Miriam R.Jan 27, 2021
  7. 3/7 bisect--helper: retire `--bisect-write` subcommandMiriam Rubio, Jan 23, 2021
  8. 2/7 bisect--helper: reimplement `bisect_replay` shell function in CMiriam Rubio, Jan 23, 2021
  9. Junio C HamanoJan 24, 2021
  10. Junio C HamanoJan 24, 2021
  11. Miriam R.Jan 25, 2021
  12. 5/7 bisect--helper: retire `--bisect-auto-next` subcommandMiriam Rubio, Jan 23, 2021
  13. 4/7 bisect--helper: use `res` instead of return in BISECT_RESET case optionMiriam Rubio, Jan 23, 2021
  14. 6/7 bisect--helper: reimplement `bisect_skip` shell function in CMiriam Rubio, Jan 23, 2021
  15. 7/7 bisect--helper: retire `--check-and-set-terms` subcommandMiriam Rubio, Jan 23, 2021
  16. Junio C HamanoJan 26, 2021
  17. Miriam R.Jan 26, 2021
  18. Junio C HamanoJan 26, 2021
  19. Miriam R.Jan 27, 2021

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.