From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C448C77B7D for ; Tue, 16 May 2023 02:32:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229620AbjEPCca (ORCPT ); Mon, 15 May 2023 22:32:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjEPCc3 (ORCPT ); Mon, 15 May 2023 22:32:29 -0400 Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2D5F19BC for ; Mon, 15 May 2023 19:32:28 -0700 (PDT) Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 2AA59197E78; Mon, 15 May 2023 22:26:53 -0400 (EDT) (envelope-from gitster@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=sasl; bh=JaK7yHo6aNKVvyDAlq2QQuc/Y gpWc2qHk9ZL3QPfyEo=; b=WkzGgyqusd8dMSNc4mwKTOqsrjKMAU/4XJr0q1O+I z4EnLp1yB6V9l6XHaXjqG7SadbdK9qr+K2ZcqGUqU9TmQIos0WTbc7ANSmz86b0k 1UCcgLrWAiO3BaRdoCW6pMex33CLE7iJUSfEl13kH+Ve7w1myrz3HeYH/EQ+YjEB M8= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 24C46197E77; Mon, 15 May 2023 22:26:53 -0400 (EDT) (envelope-from gitster@pobox.com) Received: from pobox.com (unknown [35.203.137.187]) (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 93B89197E76; Mon, 15 May 2023 22:26:52 -0400 (EDT) (envelope-from gitster@pobox.com) From: Junio C Hamano To: git@vger.kernel.org Subject: [PATCH 2/3] t2021: do not negate test_path_is_dir Date: Mon, 15 May 2023 19:26:45 -0700 Message-ID: <20230516022646.648123-3-gitster@pobox.com> X-Mailer: git-send-email 2.41.0-rc0 In-Reply-To: <20230516022646.648123-1-gitster@pobox.com> References: <20230516022646.648123-1-gitster@pobox.com> MIME-Version: 1.0 X-Pobox-Relay-ID: 1E8474F6-F391-11ED-9F27-C65BE52EC81B-77302942!pb-smtp1.pobox.com Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In this test, a path (some_dir) that is originally a directory is to be removed and then to be replaced with a file of the same name. The expectation is that the path becomes a file at the end. However, "! test_path_is_dir some_dir" is used to catch a breakage that leaves the path as a directory. But as with all the "test_path_is..." helpers, this use of the helper makes it loud when the expectation (i.e. it is a directory) is met, and otherwise is silent when it is not---this does not help debugging. Be more explicit and state that we expect the path to become a file. Signed-off-by: Junio C Hamano --- t/t2021-checkout-overwrite.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t2021-checkout-overwrite.sh b/t/t2021-checkout-overwrite.s= h index 034f62c13c..ecfacf0f7f 100755 --- a/t/t2021-checkout-overwrite.sh +++ b/t/t2021-checkout-overwrite.sh @@ -77,7 +77,7 @@ test_expect_success 'checkout --overwrite-ignore should= succeed if only ignored echo autogenerated information >some_dir/ignore && echo ignore >.git/info/exclude && git checkout --overwrite-ignore df_conflict && - ! test_path_is_dir some_dir + test_path_is_file some_dir ' =20 test_done --=20 2.41.0-rc0