git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 29, 2022, 01:56 UTC
Message-ID
<xmqqmtajosek.fsf@gitster.g>
In-Reply-To
<a55cf3b7-218d-3c8b-ae1c-c09d49caeda8@gmail.com>
Rubén Justo <rjusto@gmail.com> 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.
Previous: Rubén JustoNext: Rubén Justo
Message 9 of 16 in “branch: description for non-existent branch errors”
  1. branch: description for non-existent branch errorsRubén Justo, Sep 22, 2022
  2. branch: description for non-existent branch errorsRubén Justo, Sep 24, 2022
  3. Junio C HamanoSep 26, 2022
  4. Rubén JustoSep 26, 2022
  5. Junio C HamanoSep 27, 2022
  6. Junio C HamanoSep 28, 2022
  7. Junio C HamanoSep 28, 2022
  8. Rubén JustoSep 28, 2022
  9. Junio C HamanoSep 29, 2022
  10. branch: description for non-existent branch errorsRubén Justo, Sep 30, 2022
  11. Bagas SanjayaOct 1, 2022
  12. Rubén JustoOct 2, 2022
  13. branch: description for non-existent branch errorsRubén Justo, Oct 8, 2022
  14. Eric SunshineOct 8, 2022
  15. Rubén JustoOct 8, 2022
  16. Junio C HamanoOct 9, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.