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=-0.6 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,T_SCC_BODY_TEXT_LINE 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 3412D1F4D7 for ; Wed, 22 Jun 2022 05:37:27 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="g/cWHdzl"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357048AbiFVFhS (ORCPT ); Wed, 22 Jun 2022 01:37:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356811AbiFVFhQ (ORCPT ); Wed, 22 Jun 2022 01:37:16 -0400 Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D1AB36325 for ; Tue, 21 Jun 2022 22:37:16 -0700 (PDT) Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id E354113C0C5; Wed, 22 Jun 2022 01:37:14 -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=rNKI24HLHOrm Cvudjap4SmFmRTHWEAXxcnqxYx5lpPo=; b=g/cWHdzlENQEu3esybExw8JTRj7l DHKoVRTeu6dj5RS+gs76uFizS9JNa5qdSZcZWnZ94Q0C9A33QK1/hdGGsoqeD2N/ pHpXSI/rl0hZwjUu4HUtvtkrFqAhxYPYdzWUDToi7hBrVZS7JSJ9l3wa1m7Bj9Lu lsqfEvuB/xbI4s8= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id CCFA113C0C4; Wed, 22 Jun 2022 01:37:14 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.82.80.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 30B0613C0C3; Wed, 22 Jun 2022 01:37:14 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Cc: git@vger.kernel.org, Derrick Stolee , rsbecker@nexbridge.com, SZEDER =?utf-8?Q?G=C3=A1bor?= , Johannes Sixt , Jeff King Subject: Re: [PATCH 3/3] config tests: fix harmless but broken "rm -r" cleanup References: Date: Tue, 21 Jun 2022 22:37:12 -0700 In-Reply-To: (Junio C. Hamano's message of "Tue, 21 Jun 2022 15:34:29 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 5ED44A14-F1ED-11EC-AAC8-5E84C8D8090B-77302942!pb-smtp1.pobox.com Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Junio C Hamano writes: > =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason writes: > >> test_expect_success 'override global and system config' ' >> - test_when_finished rm -f "$HOME"/.config/git && >> + test_when_finished "rm -rf \"$HOME\"/.config/git" && > > As this string is evaled, isn't it safer to defer dereferencing the > environment variable at the runtime by quoting the dollar-sign, too? > > I.e. > > test_when_finished rm -rf \"\$HOME\"/.config/git && > > or something? It probably would matter if $HOME had a double-quote in it, I think