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

From: Junio C Hamano <[email-masked]>
Date: Sat, 08 Oct 2022 22:05:23 -0700

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

> 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.