From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 986401F403 for ; Sun, 9 Oct 2022 05:12:48 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="gNFRYduR"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229669AbiJIFFa (ORCPT ); Sun, 9 Oct 2022 01:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbiJIFF1 (ORCPT ); Sun, 9 Oct 2022 01:05:27 -0400 Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64ED02B1A5 for ; Sat, 8 Oct 2022 22:05:26 -0700 (PDT) Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 7BF22151AEC; Sun, 9 Oct 2022 01:05:25 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=ioitVyGjKurr Y67Bxb8mAiO/cbDWYQDokSdPGdHBs64=; b=gNFRYduRE/+cchmy256rxhqOmfNQ rRb71ebPBQpFf5dN7Fmi7i0WZGSzbINk0F8FhWH+lhlFi7dvaplMjdI4znksspej TC6bUMoq+PIKNy9iQqewuCOQn35m4kECWtsd3vh2y2/QE7EO1NLTVPbEgFw54xyi aeR/mITyxya5mYE= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 747C7151AE9; Sun, 9 Oct 2022 01:05:25 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.5.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id DC2BE151AE8; Sun, 9 Oct 2022 01:05:24 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: =?utf-8?Q?Rub=C3=A9n?= Justo Cc: Eric Sunshine , Git List , Bagas Sanjaya Subject: Re: [PATCH v3] branch: description for non-existent branch errors References: <930ff836-a5c4-0e85-517d-39645f00cd31@gmail.com> <8d627a2c-923f-181f-a03b-15f370c4dd0f@gmail.com> <7a332503-d267-6d2c-c2bd-d072411ca408@gmail.com> Date: Sat, 08 Oct 2022 22:05:23 -0700 In-Reply-To: <7a332503-d267-6d2c-c2bd-d072411ca408@gmail.com> (=?utf-8?Q?=22Rub=C3=A9n?= Justo"'s message of "Sat, 8 Oct 2022 10:54:12 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: FBD36B86-478F-11ED-B3A1-307A8E0A682E-77302942!pb-smtp2.pobox.com Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Rub=C3=A9n Justo 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.