Re: [PATCH v14 13/27] bisect--helper: `bisect_start` shell function partially in C

2016-08-27 Thread Junio C Hamano
Pranit Bauva writes: >> I wonder the whole thing above is better restructured to avoid >> repeated checks of the same thing. >> >> if (is it 40-hex, i.e. detached?) { >> stuff it to start_head; >> } else if (skip_prefix(head, "refs/heads/", &branchname)) { >>

Re: [PATCH v14 13/27] bisect--helper: `bisect_start` shell function partially in C

2016-08-27 Thread Pranit Bauva
Hey Junio, On Fri, Aug 26, 2016 at 12:32 AM, Junio C Hamano wrote: > Pranit Bauva writes: > >> +static int bisect_start(struct bisect_terms *terms, int no_checkout, >> + const char **argv, int argc) >> +{ >> + int i, has_double_dash = 0, must_write_terms = 0, bad_seen = 0

Re: [PATCH v14 13/27] bisect--helper: `bisect_start` shell function partially in C

2016-08-25 Thread Junio C Hamano
Junio C Hamano writes: >> +for (i = 0; i < revs.nr; i++) { >> +if (bad_seen) >> +string_list_append(&states, terms->term_good.buf); >> +else { >> +bad_seen = 1; >> +string_list_append(&states, terms->term_bad.

Re: [PATCH v14 13/27] bisect--helper: `bisect_start` shell function partially in C

2016-08-25 Thread Junio C Hamano
Pranit Bauva writes: > +static int bisect_start(struct bisect_terms *terms, int no_checkout, > + const char **argv, int argc) > +{ > + int i, has_double_dash = 0, must_write_terms = 0, bad_seen = 0; > + int flags, pathspec_pos; > + struct string_list revs = STRING_

[PATCH v14 13/27] bisect--helper: `bisect_start` shell function partially in C

2016-08-23 Thread Pranit Bauva
Reimplement the `bisect_start` shell function partially in C and add `bisect-start` subcommand to `git bisect--helper` to call it from git-bisect.sh . The last part is not converted because it calls another shell function `bisect_start` shell function will be completed after the `bisect_next` shel