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

Re: [PATCH v3 2/4] bisect--helper: reimplement `bisect_visualize()`shell function in C

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 11, 2021, 20:22 UTC
Message-ID
<xmqq35vwh8qk.fsf@gitster.g>
In-Reply-To
<20210411095538.34129-3-mirucam@gmail.com>
Miriam Rubio <mirucam@gmail.com> writes:
Show 5 quoted lines
> +	strvec_pushl(&args, "--bisect", "--", NULL);
> +
> +	strbuf_read_file(&sb, git_path_bisect_names(), 0);
> +	sq_dequote_to_strvec(sb.buf, &args);
> +	strbuf_release(&sb);

Even though it is textually not all that different, this part changed the behaviour (hopefully in a good way) quite a bit from the previous round. It would make a big difference when an element in the pathspec has shell specials.

I suspect that the reason why you didn't notice the breakage before submitting the previous round (v2) is because of a gap in the test coverage. Can we add a test, or tweak an existing one? I think a file with a space in its name would be sufficient to demonstrate the breakage in v2 and its fix in this round around "split" (in v2) vs "dequote" (in v3). A file whose name begins with a dash would demonstrate the bug that would arise due to lack of "--".

Thanks.
Previous: Miriam RubioNext: Miriam Rubio
Message 4 of 11 in “Finish converting git bisect to C part 4”
  1. 0/4 Finish converting git bisect to C part 4Miriam Rubio, Apr 11, 2021
  2. 1/4 run-command: make `exists_in_PATH()` non-staticMiriam Rubio, Apr 11, 2021
  3. 2/4 bisect--helper: reimplement `bisect_visualize()`shell function in CMiriam Rubio, Apr 11, 2021
  4. Junio C HamanoApr 11, 2021
  5. 3/4 bisect--helper: reimplement `bisect_run` shell function in CMiriam Rubio, Apr 11, 2021
  6. Junio C HamanoApr 11, 2021
  7. Junio C HamanoApr 11, 2021
  8. Christian CouderMay 5, 2021
  9. Andrzej HuntMay 4, 2021
  10. Junio C HamanoMay 5, 2021
  11. 4/4 bisect--helper: retire `--bisect-next-check` subcommandMiriam Rubio, Apr 11, 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.