Subject: Re: [PATCH 19/24] refs.c: allow listing and deleting badly named refs

From: Junio C Hamano <[email-masked]>
Date: Fri, 03 Oct 2014 13:39:39 -0700

Ronnie Sahlberg <[email-masked]> writes:

> On Thu, Oct 2, 2014 at 11:55 AM, Junio C Hamano <[email-masked]> wrote:
> ...
>> Thanks.  We originally threw all the different kind of breakages
>> into ISBROKEN, but a ref can have a malformed name or can contain a
>> bad/non value and allowing us to tell them apart is a good direction
>> to go.
>> ...
>
> I updated cache.h to try to clarify it better.
> The intention here is to expand the use of REF_ISBROKEN.
>
> For all cases  REF_ISBROKEN will be set. This includes both "the sha1
> value is bad" as well as "a name is bad".

OK.  As long as it is documented in a way to help other people who
touch the code later to tell what these REF_* mean, either way is
fine between "BADNAME is just one of the possible ways a ref is
ISBROKEN" and "BADNAME is a way and ISBROKEN is another way for a
ref to be bad", and I agree that the former (i.e. the way you
defined) is easier on the existing code.

Thanks.