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
Miriam R. <mirucam@gmail.com>
Date
Jan 25, 2021, 19:18 UTC
Message-ID
<CAN7CjDC-GdA00jWJn=cKiu-Y1AXKSOJ-Uav7ZMyeGHVSBV5HqA@mail.gmail.com>
In-Reply-To
<xmqq35yr2nh0.fsf@gitster.c.googlers.com>
Hi Junio,
El dom, 24 ene 2021 a las 1:22, Junio C Hamano (<gitster@pobox.com>) escribió:
Show 23 quoted lines
>
> Miriam Rubio <mirucam@gmail.com> writes:
>
> > 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?
>
Yes, they are a reviewer's suggestion.
> These break builds with -Werror=declaration-after-statement.
>

Sorry about this, my compiler sometimes does not alert with some -Werror. I have just sent a new version. Best, Miriam

Previous: Junio C HamanoNext: Miriam Rubio
Message 11 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.