From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4924312CDBE for ; Tue, 30 Jun 2026 18:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782842432; cv=none; b=oj5PepF8YiLmwdan64C9CEGItZ0UTf5P0aOQg9gzWyfXP4eqrd1IQvkru53p351yb2FEjwRjvoJfYS8TckPWrjsCggLjSRn/RCIatGxH1gugiif2bL54+bdjwjjpDElflYGmpTWHP3JUJdxfT+EuAqSbXZjFFiuKtwjLep1Ssa0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782842432; c=relaxed/simple; bh=viwW/SAcKnhBdyXJk0C4ilsr4ZXkcoFL8ts/l/O2IU8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=m4qOlKA0q4re4MinUvqEX5UO7Perf+fCnJuS36q1NedtixiSgeWMTnpMexdjIxCW4Fo0u5e0R18yeVc5lJQqRvz54ZXhTV//nkdwEP98relUUl+huahY8BLLnr5/7ZFGhhBCRrzL85rr8zpSmixsmKN8c7QJDHmNWXCEPIjefAQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=E5IM2boF; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=cdHAMC3Q; arc=none smtp.client-ip=103.168.172.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="E5IM2boF"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="cdHAMC3Q" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 87EEE140013C; Tue, 30 Jun 2026 14:00:30 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-05.internal (MEProxy); Tue, 30 Jun 2026 14:00:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1782842430; x=1782928830; bh=N7+SBmbxCR FDM35ys03RMYqmHf1QFO67OpTf92GXEpo=; b=E5IM2boFu9THkLv6i3RJp1jEMe gcyQiCHiKoe121YiRgsEOlrlfZA6ltOUxHI5ZjRe35hkSscrpSAyyMSLdxx7CXvX +C09jzGk3XwNFAcv3jDG3AB0kJgl/cH3dOflyGi60QPztdIcA0IekxbKzRoTOj9C w8quLG/dkil2rhBqnh+OakNyS2AlFd+mA1xB/gi+TIW2LzMJeXAn26Inpb9JQ4R7 JmzWuIn31wHOaITUVIgn8/LZj9lqQiB8+uZuKwhbdnx9yEJbfsedMOFsifbu4Va/ LlxTlp0nEyspjCJNpmoU5LldldZq/JsSlCIX+kjhAZvEJDTAbeheTWktxVjw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1782842430; x=1782928830; bh=N7+SBmbxCRFDM35ys03RMYqmHf1QFO67OpT f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dtQSJ4rA X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Jun 2026 14:00:29 -0400 (EDT) From: Junio C Hamano To: "Bryan B. Lima" Cc: git@vger.kernel.org, gustavoscorrea@usp.br, =?utf-8?B?w4Z2YXIgQXJu?= =?utf-8?B?ZmrDtnLDsA==?= Bjarmason Subject: Re: [PATCH] submodule absorbgitdirs tests: use test_* helper functions In-Reply-To: <20260630020220.1559190-1-bblima@usp.br> (Bryan B. Lima's message of "Mon, 29 Jun 2026 23:02:20 -0300") References: <20260630020220.1559190-1-bblima@usp.br> Date: Tue, 30 Jun 2026 11:00:28 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Bryan B. Lima" writes: > Use modern helper functions from test-lib-functions.sh to provide nice error messages. > > Signed-off-by: Bryan B. Lima > Co-authored-by: Gustavo S. Correa > Signed-off-by: Gustavo S. Correa > --- > t/t7412-submodule-absorbgitdirs.sh | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) Welcome to the Git development community. It is rare, but it happens from time to time, that we see a patch by somebody we haven't seen on this list, and the patch looks perfect. Very delighted. Will queue. Thanks. > diff --git a/t/t7412-submodule-absorbgitdirs.sh b/t/t7412-submodule-absorbgitdirs.sh > index 0490499573..bd1c684480 100755 > --- a/t/t7412-submodule-absorbgitdirs.sh > +++ b/t/t7412-submodule-absorbgitdirs.sh > @@ -34,8 +34,8 @@ test_expect_success 'absorb the git dir' ' > git submodule absorbgitdirs 2>actual && > test_cmp expect actual && > git fsck && > - test -f sub1/.git && > - test -d .git/modules/sub1 && > + test_path_is_file sub1/.git && > + test_path_is_dir .git/modules/sub1 && > git status >actual.1 && > git -C sub1 rev-parse HEAD >actual.2 && > test_cmp expect.1 actual.1 && > @@ -47,9 +47,9 @@ test_expect_success 'absorbing does not fail for deinitialized submodules' ' > git submodule deinit --all && > git submodule absorbgitdirs 2>err && > test_must_be_empty err && > - test -d .git/modules/sub1 && > - test -d sub1 && > - ! test -e sub1/.git > + test_path_is_dir .git/modules/sub1 && > + test_path_is_dir sub1 && > + test_path_is_missing sub1/.git > ' > > test_expect_success 'setup nested submodule' ' > @@ -72,8 +72,8 @@ test_expect_success 'absorb the git dir in a nested submodule' ' > EOF > git submodule absorbgitdirs 2>actual && > test_cmp expect actual && > - test -f sub1/nested/.git && > - test -d .git/modules/sub1/modules/nested && > + test_path_is_file sub1/nested/.git && > + test_path_is_dir .git/modules/sub1/modules/nested && > git status >actual.1 && > git -C sub1/nested rev-parse HEAD >actual.2 && > test_cmp expect.1 actual.1 && > @@ -109,9 +109,9 @@ test_expect_success 'absorb the git dir in a nested submodule' ' > EOF > git submodule absorbgitdirs 2>actual && > test_cmp expect actual && > - test -f sub1/.git && > - test -f sub1/nested/.git && > - test -d .git/modules/sub1/modules/nested && > + test_path_is_file sub1/.git && > + test_path_is_file sub1/nested/.git && > + test_path_is_dir .git/modules/sub1/modules/nested && > git status >actual.1 && > git -C sub1/nested rev-parse HEAD >actual.2 && > test_cmp expect.1 actual.1 && > @@ -155,7 +155,7 @@ test_expect_success 'absorbing the git dir fails for incomplete submodules' ' > test_must_fail git submodule absorbgitdirs 2>actual && > test_cmp expect actual && > git -C sub2 fsck && > - test -d sub2/.git && > + test_path_is_dir sub2/.git && > git status >actual && > git -C sub2 rev-parse HEAD >actual.2 && > test_cmp expect.1 actual.1 && > > base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc