From: Karthik Nayak <karthik.188@gmail•com>
To: git@vger•kernel.org
Cc: Karthik Nayak <karthik.188@gmail•com>, ps@pks•im, jltobler@gmail•com
Subject: [PATCH 4/4] t/pack-refs-tests: move the 'test_done' to callees
Date: Wed, 15 Oct 2025 23:25:09 +0200 [thread overview]
Message-ID: <20251015-refs-code-cleanup-v1-4-550fdd8a3b41@gmail.com> (raw)
In-Reply-To: <20251015-refs-code-cleanup-v1-0-550fdd8a3b41@gmail.com>
In ac0bad0af4 (t0601: refactor tests to be shareable, 2025-09-19), we
refactored 't/t0601-reffiles-pack-refs.sh' to move all of the tests to
't/pack-refs-tests.sh', which became a common test suite which was also
used by 't/t1463-refs-optimize.sh'.
This also moved the 'test_done' directive to 't/pack-refs-tests.sh'.
Which inhibits additional tests from being added to either of the tests.
Let's move the directive out to both the tests, so that we can add
additional specific tests to them. Also the test flow logic shouldn't be
part of tests which can be embedded in other test scripts.
Signed-off-by: Karthik Nayak <karthik.188@gmail•com>
---
t/pack-refs-tests.sh | 2 --
t/t0601-reffiles-pack-refs.sh | 2 ++
t/t1463-refs-optimize.sh | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/t/pack-refs-tests.sh b/t/pack-refs-tests.sh
index 095823d915..81086c3690 100644
--- a/t/pack-refs-tests.sh
+++ b/t/pack-refs-tests.sh
@@ -459,5 +459,3 @@ test_expect_success 'pack-refs does not store invalid peeled tag value' '
test_grep ! "^\^" .git/packed-refs
)
'
-
-test_done
diff --git a/t/t0601-reffiles-pack-refs.sh b/t/t0601-reffiles-pack-refs.sh
index 12cf5d1dcb..3c706978ef 100755
--- a/t/t0601-reffiles-pack-refs.sh
+++ b/t/t0601-reffiles-pack-refs.sh
@@ -18,3 +18,5 @@ export GIT_TEST_DEFAULT_REF_FORMAT
. ./test-lib.sh
. "$TEST_DIRECTORY"/pack-refs-tests.sh
+
+test_done
diff --git a/t/t1463-refs-optimize.sh b/t/t1463-refs-optimize.sh
index c11c905d79..9afe3c1ed7 100755
--- a/t/t1463-refs-optimize.sh
+++ b/t/t1463-refs-optimize.sh
@@ -15,3 +15,5 @@ export GIT_TEST_DEFAULT_REF_FORMAT
pack_refs='refs optimize'
. "$TEST_DIRECTORY"/pack-refs-tests.sh
+
+test_done
--
2.51.0
next prev parent reply other threads:[~2025-10-15 21:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 21:25 [PATCH 0/4] refs: cleanup code around optimizations Karthik Nayak
2025-10-15 21:25 ` [PATCH 1/4] refs: move to using the '.optimize' functions Karthik Nayak
2025-10-15 22:05 ` Justin Tobler
2025-10-16 10:37 ` Patrick Steinhardt
2025-10-16 12:07 ` Karthik Nayak
2025-10-16 12:11 ` Patrick Steinhardt
2025-10-16 12:03 ` Karthik Nayak
2025-10-15 21:25 ` [PATCH 2/4] refs: cleanup code around optimization Karthik Nayak
2025-10-15 22:09 ` Justin Tobler
2025-10-15 21:25 ` [PATCH 3/4] refs: rename 'pack_refs_opts' to 'refs_optimize_opts' Karthik Nayak
2025-10-15 22:18 ` Justin Tobler
2025-10-16 12:15 ` Karthik Nayak
2025-10-15 21:25 ` Karthik Nayak [this message]
2025-10-16 10:38 ` [PATCH 0/4] refs: cleanup code around optimizations Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251015-refs-code-cleanup-v1-4-550fdd8a3b41@gmail.com \
--to=karthik.188@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=jltobler@gmail$(echo .)com \
--cc=ps@pks$(echo .)im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox