diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-03-25 11:02:59 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-03-25 09:54:07 -0700 |
| commit | ed12124d4a809c832ae7f963ecc71104ba5cd55b (patch) | |
| tree | b072e18f3ac02c87e588b10917114effc6cbd70f /t/t0601-reffiles-pack-refs.sh | |
| parent | 4ccf7060d8d0a3c08d1fb03b038a164eb4913d02 (diff) | |
| download | git-ed12124d4a809c832ae7f963ecc71104ba5cd55b.tar.xz | |
t/helper: drop pack-refs wrapper
The test helper provides a "ref-store <store> pack-refs" wrapper that
more or less directly invokes `refs_pack_refs()`. This helper is only
used in a single test with the "PACK_REFS_PRUNE" and "PACK_REFS_ALL"
flags. Both of these flags can directly be accessed via git-pack-refs(1)
though via the `--all` and `--prune` flags, which makes the helper
superfluous.
Refactor the test to use git-pack-refs(1) instead of the test helper.
Drop the now-unused test helper command.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0601-reffiles-pack-refs.sh')
| -rwxr-xr-x | t/t0601-reffiles-pack-refs.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/t/t0601-reffiles-pack-refs.sh b/t/t0601-reffiles-pack-refs.sh index c309d2bae8..b1cf587347 100755 --- a/t/t0601-reffiles-pack-refs.sh +++ b/t/t0601-reffiles-pack-refs.sh @@ -32,11 +32,16 @@ test_expect_success 'prepare a trivial repository' ' HEAD=$(git rev-parse --verify HEAD) ' -test_expect_success 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' ' - N=`find .git/refs -type f | wc -l` && +test_expect_success 'pack-refs --prune --all' ' + test_path_is_missing .git/packed-refs && + git pack-refs --no-prune --all && + test_path_is_file .git/packed-refs && + N=$(find .git/refs -type f | wc -l) && test "$N" != 0 && - test-tool ref-store main pack-refs PACK_REFS_PRUNE,PACK_REFS_ALL && - N=`find .git/refs -type f` && + + git pack-refs --prune --all && + test_path_is_file .git/packed-refs && + N=$(find .git/refs -type f) && test -z "$N" ' |
