Subject: Re: [PATCH] branch: description for non-existent branch errors

From: Junio C Hamano <[email-masked]>
Date: Wed, 28 Sep 2022 18:56:03 -0700

Rubén Justo <[email-masked]> writes:

> Those changes I think are worth doing along with the fix for the leak
> of 'static const char *head'.

Let's not grow the scope of the topic forever.  It will increase the
chance of new mistakes and throw us into endless iterations.

I think the posted patch plus tests for the new behaviour (i.e. no
longer we give a misleading error message) is a good stopping point.

Extending the behaviour to allow some of these operations that
currently fail on an unborn branch may or may not make sense, and
that should be discussed separately, possibly for each option.
After the dust from the current one settles.

Personally, I do not think a "static const char *" variable that
holds onto an allocated piece of memory smaller than 1kB is
something we should worry about.  Leak checkers should also be smart
enough not to warn about such a variable, shouldn't they?

> And then the error descriptions.  Not just the capitalization but
> some similar but different messages too.

Yup, and that is probably a separate patch after all of the above
settles.

Thanks.