Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-23 Thread Pranit Bauva
On Wed, Mar 23, 2016 at 4:52 PM, Johannes Schindelin wrote: > Hi Pranit, > > On Tue, 22 Mar 2016, Pranit Bauva wrote: > >> I did run the tests. They produce the same results as they did before. >> To ease review I will next time include these the output of the tests >> in the commented section. >>

Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-23 Thread Johannes Schindelin
Hi, On Tue, 22 Mar 2016, Stefan Beller wrote: > On Tue, Mar 22, 2016 at 10:52 AM, Pranit Bauva wrote: > > OPT_CMDMODE() is actually a better option. I also noticed that it > > isn't mentioned in Documentation/technical/api-parse-options.txt . > > Should I send a patch to include it there just to

Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-23 Thread Johannes Schindelin
Hi Pranit, On Tue, 22 Mar 2016, Pranit Bauva wrote: > On Tue, Mar 22, 2016 at 8:41 PM, Johannes Schindelin > wrote: > > > > On Tue, 22 Mar 2016, Johannes Schindelin wrote: > > > >> On Tue, 22 Mar 2016, Pranit Bauva wrote: > >> > >> > + if (!strcmp(term, "bad") || !strcmp(term, "new")) > >> > +

Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-23 Thread Johannes Schindelin
Hi Pranit, On Tue, 22 Mar 2016, Pranit Bauva wrote: > I did run the tests. They produce the same results as they did before. > To ease review I will next time include these the output of the tests > in the commented section. > > t6002-rev-list-bisect.sh : http://paste.ubuntu.com/15473728/ > t603

Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-22 Thread Stefan Beller
On Tue, Mar 22, 2016 at 10:52 AM, Pranit Bauva wrote: > OPT_CMDMODE() is actually a better option. I also noticed that it > isn't mentioned in Documentation/technical/api-parse-options.txt . > Should I send a patch to include it there just to make it easier for > someone who is new and isn't aware

Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-22 Thread Pranit Bauva
On Tue, Mar 22, 2016 at 9:33 PM, Junio C Hamano wrote: > Johannes Schindelin writes: > >> static int one_of(const char *term, ...) >> { >> va_list matches; >> const char *match; >> >> va_start(matches, term); >> while ((match = va_arg(matches, const char *))) >>

Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-22 Thread Pranit Bauva
On Tue, Mar 22, 2016 at 8:41 PM, Johannes Schindelin wrote: > Hi, > > On Tue, 22 Mar 2016, Johannes Schindelin wrote: > >> On Tue, 22 Mar 2016, Pranit Bauva wrote: >> >> > + if (!strcmp(term, "bad") || !strcmp(term, "new")) >> > + if(strcmp(revision, "bad")) >> > + di

Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-22 Thread Pranit Bauva
On Tue, Mar 22, 2016 at 8:39 PM, Johannes Schindelin wrote: > Hi, > > On Tue, 22 Mar 2016, Pranit Bauva wrote: > >> Convert the code literally without changing its design even though it >> seems that its obscure as to the use of comparing revision to different > > s/its/it is/ Sure! A typo. >> b

Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-22 Thread Johannes Schindelin
Hi Junio, On Tue, 22 Mar 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > >>struct option options[] = { > >>OPT_BOOL(0, "next-all", &next_all, > >> N_("perform 'git bisect next'")), > >>OPT_BOOL(0, "no-checkout", &no_checkout, > >>

Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-22 Thread Junio C Hamano
Johannes Schindelin writes: > static int one_of(const char *term, ...) > { > va_list matches; > const char *match; > > va_start(matches, term); > while ((match = va_arg(matches, const char *))) > if (!strcmp(term, match)) > return 1; >

Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-22 Thread Johannes Schindelin
Hi, On Tue, 22 Mar 2016, Johannes Schindelin wrote: > On Tue, 22 Mar 2016, Pranit Bauva wrote: > > > + if (!strcmp(term, "bad") || !strcmp(term, "new")) > > + if(strcmp(revision, "bad")) > > + die("can't change the meaning of term '%s'", term); > > + > > + if (!st

Re: [PATCH v2] bisect--helper: convert a function in shell to C

2016-03-22 Thread Johannes Schindelin
Hi, On Tue, 22 Mar 2016, Pranit Bauva wrote: > Convert the code literally without changing its design even though it > seems that its obscure as to the use of comparing revision to different s/its/it is/ > bisect arguments which seems like a problem in shell because of the way > function argume

[PATCH v2] bisect--helper: convert a function in shell to C

2016-03-22 Thread Pranit Bauva
Convert the code literally without changing its design even though it seems that its obscure as to the use of comparing revision to different bisect arguments which seems like a problem in shell because of the way function arguments are handled. The argument handling is kind of hard coded right no