{"thread":{"id":"65891","subject":"[PATCH] submodule absorbgitdirs tests: use test_* helper functions","startedAt":"2026-06-30T02:04:24Z","lastAt":"2026-07-27T15:59:52Z","messageCount":4,"participants":["Bryan B. Lima","Junio C Hamano","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"546723","messageId":"20260630020220.1559190-1-bblima@usp.br","threadId":"65891","inReplyTo":null,"subject":"[PATCH] submodule absorbgitdirs tests: use test_* helper functions","fromName":"Bryan B. Lima","fromEmail":"bblima@usp.br","sentAt":"2026-06-30T02:02:20Z","receivedAt":"2026-06-30T02:04:24Z","isPatch":true,"body":"Use modern helper functions from test-lib-functions.sh to provide nice error messages.\n\nSigned-off-by: Bryan B. Lima <bblima@usp.br>\nCo-authored-by: Gustavo S. Correa <gustavoscorrea@usp.br>\nSigned-off-by: Gustavo S. Correa <gustavoscorrea@usp.br>\n---\n t/t7412-submodule-absorbgitdirs.sh | 22 +++++++++++-----------\n 1 file changed, 11 insertions(+), 11 deletions(-)\n\ndiff --git a/t/t7412-submodule-absorbgitdirs.sh b/t/t7412-submodule-absorbgitdirs.sh\nindex 0490499573..bd1c684480 100755\n--- a/t/t7412-submodule-absorbgitdirs.sh\n+++ b/t/t7412-submodule-absorbgitdirs.sh\n@@ -34,8 +34,8 @@ test_expect_success 'absorb the git dir' '\n \tgit submodule absorbgitdirs 2>actual &&\n \ttest_cmp expect actual &&\n \tgit fsck &&\n-\ttest -f sub1/.git &&\n-\ttest -d .git/modules/sub1 &&\n+\ttest_path_is_file sub1/.git &&\n+\ttest_path_is_dir .git/modules/sub1 &&\n \tgit status >actual.1 &&\n \tgit -C sub1 rev-parse HEAD >actual.2 &&\n \ttest_cmp expect.1 actual.1 &&\n@@ -47,9 +47,9 @@ test_expect_success 'absorbing does not fail for deinitialized submodules' '\n \tgit submodule deinit --all &&\n \tgit submodule absorbgitdirs 2>err &&\n \ttest_must_be_empty err &&\n-\ttest -d .git/modules/sub1 &&\n-\ttest -d sub1 &&\n-\t! test -e sub1/.git\n+\ttest_path_is_dir .git/modules/sub1 &&\n+\ttest_path_is_dir sub1 &&\n+\ttest_path_is_missing sub1/.git\n '\n \n test_expect_success 'setup nested submodule' '\n@@ -72,8 +72,8 @@ test_expect_success 'absorb the git dir in a nested submodule' '\n \tEOF\n \tgit submodule absorbgitdirs 2>actual &&\n \ttest_cmp expect actual &&\n-\ttest -f sub1/nested/.git &&\n-\ttest -d .git/modules/sub1/modules/nested &&\n+\ttest_path_is_file sub1/nested/.git &&\n+\ttest_path_is_dir .git/modules/sub1/modules/nested &&\n \tgit status >actual.1 &&\n \tgit -C sub1/nested rev-parse HEAD >actual.2 &&\n \ttest_cmp expect.1 actual.1 &&\n@@ -109,9 +109,9 @@ test_expect_success 'absorb the git dir in a nested submodule' '\n \tEOF\n \tgit submodule absorbgitdirs 2>actual &&\n \ttest_cmp expect actual &&\n-\ttest -f sub1/.git &&\n-\ttest -f sub1/nested/.git &&\n-\ttest -d .git/modules/sub1/modules/nested &&\n+\ttest_path_is_file sub1/.git &&\n+\ttest_path_is_file sub1/nested/.git &&\n+\ttest_path_is_dir .git/modules/sub1/modules/nested &&\n \tgit status >actual.1 &&\n \tgit -C sub1/nested rev-parse HEAD >actual.2 &&\n \ttest_cmp expect.1 actual.1 &&\n@@ -155,7 +155,7 @@ test_expect_success 'absorbing the git dir fails for incomplete submodules' '\n \ttest_must_fail git submodule absorbgitdirs 2>actual &&\n \ttest_cmp expect actual &&\n \tgit -C sub2 fsck &&\n-\ttest -d sub2/.git &&\n+\ttest_path_is_dir sub2/.git &&\n \tgit status >actual &&\n \tgit -C sub2 rev-parse HEAD >actual.2 &&\n \ttest_cmp expect.1 actual.1 &&\n\nbase-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc\n-- \n2.54.0\n\n"},{"id":"546801","messageId":"xmqqmrwbsybn.fsf@gitster.g","threadId":"65891","inReplyTo":"20260630020220.1559190-1-bblima@usp.br","subject":"Re: [PATCH] submodule absorbgitdirs tests: use test_* helper functions","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-06-30T18:00:28Z","receivedAt":"2026-06-30T18:00:31Z","isPatch":true,"body":"\"Bryan B. Lima\" <bblima@usp.br> writes:\n\n> Use modern helper functions from test-lib-functions.sh to provide nice error messages.\n>\n> Signed-off-by: Bryan B. Lima <bblima@usp.br>\n> Co-authored-by: Gustavo S. Correa <gustavoscorrea@usp.br>\n> Signed-off-by: Gustavo S. Correa <gustavoscorrea@usp.br>\n> ---\n>  t/t7412-submodule-absorbgitdirs.sh | 22 +++++++++++-----------\n>  1 file changed, 11 insertions(+), 11 deletions(-)\n\nWelcome to the Git development community.\n\nIt is rare, but it happens from time to time, that we see a patch by\nsomebody we haven't seen on this list, and the patch looks perfect.\nVery delighted.\n\nWill queue.  Thanks.\n\n> diff --git a/t/t7412-submodule-absorbgitdirs.sh b/t/t7412-submodule-absorbgitdirs.sh\n> index 0490499573..bd1c684480 100755\n> --- a/t/t7412-submodule-absorbgitdirs.sh\n> +++ b/t/t7412-submodule-absorbgitdirs.sh\n> @@ -34,8 +34,8 @@ test_expect_success 'absorb the git dir' '\n>  \tgit submodule absorbgitdirs 2>actual &&\n>  \ttest_cmp expect actual &&\n>  \tgit fsck &&\n> -\ttest -f sub1/.git &&\n> -\ttest -d .git/modules/sub1 &&\n> +\ttest_path_is_file sub1/.git &&\n> +\ttest_path_is_dir .git/modules/sub1 &&\n>  \tgit status >actual.1 &&\n>  \tgit -C sub1 rev-parse HEAD >actual.2 &&\n>  \ttest_cmp expect.1 actual.1 &&\n> @@ -47,9 +47,9 @@ test_expect_success 'absorbing does not fail for deinitialized submodules' '\n>  \tgit submodule deinit --all &&\n>  \tgit submodule absorbgitdirs 2>err &&\n>  \ttest_must_be_empty err &&\n> -\ttest -d .git/modules/sub1 &&\n> -\ttest -d sub1 &&\n> -\t! test -e sub1/.git\n> +\ttest_path_is_dir .git/modules/sub1 &&\n> +\ttest_path_is_dir sub1 &&\n> +\ttest_path_is_missing sub1/.git\n>  '\n>  \n>  test_expect_success 'setup nested submodule' '\n> @@ -72,8 +72,8 @@ test_expect_success 'absorb the git dir in a nested submodule' '\n>  \tEOF\n>  \tgit submodule absorbgitdirs 2>actual &&\n>  \ttest_cmp expect actual &&\n> -\ttest -f sub1/nested/.git &&\n> -\ttest -d .git/modules/sub1/modules/nested &&\n> +\ttest_path_is_file sub1/nested/.git &&\n> +\ttest_path_is_dir .git/modules/sub1/modules/nested &&\n>  \tgit status >actual.1 &&\n>  \tgit -C sub1/nested rev-parse HEAD >actual.2 &&\n>  \ttest_cmp expect.1 actual.1 &&\n> @@ -109,9 +109,9 @@ test_expect_success 'absorb the git dir in a nested submodule' '\n>  \tEOF\n>  \tgit submodule absorbgitdirs 2>actual &&\n>  \ttest_cmp expect actual &&\n> -\ttest -f sub1/.git &&\n> -\ttest -f sub1/nested/.git &&\n> -\ttest -d .git/modules/sub1/modules/nested &&\n> +\ttest_path_is_file sub1/.git &&\n> +\ttest_path_is_file sub1/nested/.git &&\n> +\ttest_path_is_dir .git/modules/sub1/modules/nested &&\n>  \tgit status >actual.1 &&\n>  \tgit -C sub1/nested rev-parse HEAD >actual.2 &&\n>  \ttest_cmp expect.1 actual.1 &&\n> @@ -155,7 +155,7 @@ test_expect_success 'absorbing the git dir fails for incomplete submodules' '\n>  \ttest_must_fail git submodule absorbgitdirs 2>actual &&\n>  \ttest_cmp expect actual &&\n>  \tgit -C sub2 fsck &&\n> -\ttest -d sub2/.git &&\n> +\ttest_path_is_dir sub2/.git &&\n>  \tgit status >actual &&\n>  \tgit -C sub2 rev-parse HEAD >actual.2 &&\n>  \ttest_cmp expect.1 actual.1 &&\n>\n> base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc\n"},{"id":"546855","messageId":"akTKHfKPsP3-Rn31@pks.im","threadId":"65891","inReplyTo":"xmqqmrwbsybn.fsf@gitster.g","subject":"Re: [PATCH] submodule absorbgitdirs tests: use test_* helper functions","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-07-01T08:04:45Z","receivedAt":"2026-07-01T08:04:51Z","isPatch":true,"body":"On Tue, Jun 30, 2026 at 11:00:28AM -0700, Junio C Hamano wrote:\n> \"Bryan B. Lima\" <bblima@usp.br> writes:\n> \n> > Use modern helper functions from test-lib-functions.sh to provide nice error messages.\n> >\n> > Signed-off-by: Bryan B. Lima <bblima@usp.br>\n> > Co-authored-by: Gustavo S. Correa <gustavoscorrea@usp.br>\n> > Signed-off-by: Gustavo S. Correa <gustavoscorrea@usp.br>\n> > ---\n> >  t/t7412-submodule-absorbgitdirs.sh | 22 +++++++++++-----------\n> >  1 file changed, 11 insertions(+), 11 deletions(-)\n> \n> Welcome to the Git development community.\n\nWelcome indeed!\n\n> It is rare, but it happens from time to time, that we see a patch by\n> somebody we haven't seen on this list, and the patch looks perfect.\n> Very delighted.\n\nSorry to spoil it: the order of SOBs is incorrect. The patch is authored\nby Bryan, so that signoff needs to come last.\n\nThe patch itself looks good though, thanks!\n\nPatrick\n"},{"id":"549091","messageId":"xmqqik60o22y.fsf@gitster.g","threadId":"65891","inReplyTo":"akTKHfKPsP3-Rn31@pks.im","subject":"Re: [PATCH] submodule absorbgitdirs tests: use test_* helper functions","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-07-27T15:59:49Z","receivedAt":"2026-07-27T15:59:52Z","isPatch":true,"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> On Tue, Jun 30, 2026 at 11:00:28AM -0700, Junio C Hamano wrote:\n>> \"Bryan B. Lima\" <bblima@usp.br> writes:\n>> \n>> > Use modern helper functions from test-lib-functions.sh to provide nice error messages.\n>> >\n>> > Signed-off-by: Bryan B. Lima <bblima@usp.br>\n>> > Co-authored-by: Gustavo S. Correa <gustavoscorrea@usp.br>\n>> > Signed-off-by: Gustavo S. Correa <gustavoscorrea@usp.br>\n>> > ---\n>> >  t/t7412-submodule-absorbgitdirs.sh | 22 +++++++++++-----------\n>> >  1 file changed, 11 insertions(+), 11 deletions(-)\n>> \n>> Welcome to the Git development community.\n>\n> Welcome indeed!\n>\n>> It is rare, but it happens from time to time, that we see a patch by\n>> somebody we haven't seen on this list, and the patch looks perfect.\n>> Very delighted.\n>\n> Sorry to spoil it: the order of SOBs is incorrect. The patch is authored\n> by Bryan, so that signoff needs to come last.\n>\n> The patch itself looks good though, thanks!\n\n\nThis discussion thread has been hanging for a while after we saw\nthis message.  To help a new participant, here are a few tips.\n\n * These discussions can be seen on mail archives.  On the primary\n   archive, the message I am responding to appears here:\n\n   https://lore.kernel.org/git/akTKHfKPsP3-Rn31@pks.im/\n\n   For any discussion you are interested in, replace the URL path\n   with the Message-Id of the message that is part of the\n   discussion.  For example, after sending a patch, you use the\n   message ID of the patch message you sent out and by visiting the\n   page there, you see everything people said on your patch.\n\n   https://lore.kernel.org/git/20260630020220.1559190-1-bblima@usp.br/\n\n   Scroll down to see the \"Thread overview\".\n\n * When you receive a review response to help you polish your patch\n   submission, you are expected to respond to it.  If the reviewer\n   suggested an improvement, either you respond explaining why your\n   original is better without the change suggested, or you respond\n   thanking the reviewer for the suggestion and promise to submit an\n   updated version that incorporates the suggested improvements, and\n   then take your time to improve the patch and send a \"reroll\".\n   For this patch, it would be numbered \"v2\".\n\n   As we can see, neither option has occurred, and this discussion\n   thread is keeping everybody waiting.\n\nThanks.\n"}]}