Re: [PATCH v15 15/27] bisect--helper: `bisect_next` and `bisect_auto_next` shell function in C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pranit,

On 12/31/2016 11:43 AM, Pranit Bauva wrote:
>>> +
>>> +static int bisect_auto_next(struct bisect_terms *terms, const char *prefix)
>>> +{
>>> +     if (!bisect_next_check(terms, NULL))
>>> +             return bisect_next(terms, prefix);
>>> +
>>> +     return 0;
>>> +}
>>
>> Hmm, the handling of the return values is a little confusing. However,
>> if I understand the sh source correctly, it always returns success, no
>> matter if bisect_next failed or not. I do not know if you had something
>> special in mind here.
> 
> Umm. Shell code used to die() and thus exit with an error code.

The invoked bisect_next shell code called "exit", right... you had to
replace this by passing return values. I get it. Thank you!

>>>  int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
>>> @@ -643,6 +794,10 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
>>>                        N_("print out the bisect terms"), BISECT_TERMS),
>>>               OPT_CMDMODE(0, "bisect-start", &cmdmode,
>>>                        N_("start the bisect session"), BISECT_START),
>>> +             OPT_CMDMODE(0, "bisect-next", &cmdmode,
>>> +                      N_("find the next bisection commit"), BISECT_NEXT),
>>> +             OPT_CMDMODE(0, "bisect-auto-next", &cmdmode,
>>> +                      N_("verify the next bisection state then find the next bisection state"), BISECT_AUTO_NEXT),
>>
>> The next bisection *state* is found?
> 
> checkout is more appropriate. I don't remember why I used "find".

"checkout the next bisection commit" maybe?

Thanks,
  Stephan



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]