Pranit Bauva <pranit.ba...@gmail.com> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to