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.