Re: [PATCH v14 09/27] bisect--helper: `bisect_write` shell function in C

2016-08-30 Thread Pranit Bauva
Hey Junio, On Sun, Aug 28, 2016 at 2:52 AM, Junio C Hamano wrote: > > Pranit Bauva writes: > > >>> +struct bisect_terms { > >>> + struct strbuf term_good; > >>> + struct strbuf term_bad; > >>> +}; > >> > >> I think "struct strbuf" is overrated.

Re: [PATCH v14 09/27] bisect--helper: `bisect_write` shell function in C

2016-08-27 Thread Junio C Hamano
Pranit Bauva writes: >>> +struct bisect_terms { >>> + struct strbuf term_good; >>> + struct strbuf term_bad; >>> +}; >> >> I think "struct strbuf" is overrated. ... >> I think you can just say "const char *" in this case. > > Using struct strbuf is not really

Re: [PATCH v14 09/27] bisect--helper: `bisect_write` shell function in C

2016-08-27 Thread Pranit Bauva
Hey Junio, On Thu, Aug 25, 2016 at 4:00 AM, Junio C Hamano wrote: > Pranit Bauva writes: > >> +struct bisect_terms { >> + struct strbuf term_good; >> + struct strbuf term_bad; >> +}; > > I think "struct strbuf" is overrated. For things like

Re: [PATCH v14 09/27] bisect--helper: `bisect_write` shell function in C

2016-08-24 Thread Junio C Hamano
Pranit Bauva writes: > +struct bisect_terms { > + struct strbuf term_good; > + struct strbuf term_bad; > +}; I think "struct strbuf" is overrated. For things like this, where these fields will never change once it is set (and setting it is done atomically, not

[PATCH v14 09/27] bisect--helper: `bisect_write` shell function in C

2016-08-23 Thread Pranit Bauva
Reimplement the `bisect_write` shell function in C and add a `bisect-write` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--bisect-write` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more functions are ported,