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

From: Junio C Hamano <[email-masked]>
Date: Sat, 27 Aug 2016 13:53:29 -0700

Pranit Bauva <[email-masked]> 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)) {
>>                 do the "cogito" check;
>>                 stuff it to start_head;
>>         } else {
>>                 that's a strange symbolic ref HEAD you have there;
>>         }
>
> I guess it changes the behaviour. Its a strange symbolic ref if it
> does not start with "refs/heads".

I did not think my suggestion would change the behaviour at all.  It
would change the code structure a bit to make it more readable, though.