Re: [PATCH v6 2/3] bisect: rewrite `check_term_format` shell function in C

2016-05-13 Thread Junio C Hamano
Pranit Bauva writes: > Not just that, it would also be fundamentally more correct as there is > a difference between " !strcmp("good") " and " strcmp("bad") ". Not really. As long as you are in tight control of the callers, because we'd never call $2 with anything other

Re: [PATCH v6 2/3] bisect: rewrite `check_term_format` shell function in C

2016-05-13 Thread Pranit Bauva
On Fri, May 13, 2016 at 4:06 AM, Junio C Hamano wrote: > Pranit Bauva writes: > >> + /* >> + * In theory, nothing prevents swapping completely good and bad, >> + * but this situation could be confusing and hasn't been tested >> + *

Re: [PATCH v6 2/3] bisect: rewrite `check_term_format` shell function in C

2016-05-12 Thread Junio C Hamano
Pranit Bauva writes: > + /* > + * In theory, nothing prevents swapping completely good and bad, > + * but this situation could be confusing and hasn't been tested > + * enough. Forbid it for now. > + */ > + > + if ((strcmp(orig_term, "bad") &&