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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 9, 2022, 05:05 UTC
Message-ID
<xmqq4jwda8oc.fsf@gitster.g>
In-Reply-To
<7a332503-d267-6d2c-c2bd-d072411ca408@gmail.com>
Rubén Justo <rjusto@gmail.com> writes:
Show 6 quoted lines
> Thanks, I didn't know about $SQ.
>
> 	'\''$current'\'' vs $SQ$current$SQ vs ${SQ}$current${SQ}
>
> I also find ugly that escaping, but I think is harder to read and
> error prone to use $SQ here.. :-/

The ONLY case when $SQ shines is when the string that comes inside the single-quote pair begins with a non-alnum. $SQ$current$SQ is semi-readable, but if the string begins with an alnum, then you'd be forced to say ${SQ}current${SQ} (the first one must be inside braces because you do not want to refer to a variable whose name is SQcurrent, the second one wants to be inside braces for symmetry), which is ugly.

The rhythm of '\'' is not so bad, once you get used to seeing them. ${SQ}...${SQ} is a bit too loud.

Previous: Rubén Justo
Message 16 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.