From: Han-Wen Nienhuys Date: Mon, 2 Aug 2021 16:53:32 +0000 (+0000) Subject: t1405: mark test for 'git pack-refs' as REFFILES X-Git-Tag: v2.34.0-rc0~242^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a50234b3be9d6ff75dfca9b0802e7cf97179ff11;p=thirdparty%2Fgit.git t1405: mark test for 'git pack-refs' as REFFILES The tests verifies that "pack-refs" causes loose refs to be packed. As both loose and packed refs are concepts specific to the files backend, mark the test as REFFILES. Check the outcome of the pack-refs operation. This was apparently forgotten in the commit introducing this test: 16feb99d (Mar 26 2017, "t1405: some basic tests on main ref store"). Signed-off-by: Han-Wen Nienhuys Signed-off-by: Junio C Hamano --- diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh index 92b0487324..49718b7ea7 100755 --- a/t/t1405-main-ref-store.sh +++ b/t/t1405-main-ref-store.sh @@ -9,12 +9,18 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME RUN="test-tool ref-store main" -test_expect_success 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' ' - test_commit one && + +test_expect_success 'setup' ' + test_commit one +' + +test_expect_success REFFILES 'pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)' ' N=`find .git/refs -type f | wc -l` && test "$N" != 0 && - $RUN pack-refs 3 && - N=`find .git/refs -type f | wc -l` + ALL_OR_PRUNE_FLAG=3 && + $RUN pack-refs ${ALL_OR_PRUNE_FLAG} && + N=`find .git/refs -type f` && + test -z "$N" ' test_expect_success 'create_symref(FOO, refs/heads/main)' '